Commit 597a1e7cccc9a5a0c47629267ac4b23bf8654578

Authored by Peter Huewe
Committed by Greg Kroah-Hartman
1 parent fb657461ab

staging/line6: Fix sparse warning 'Using plain integer as NULL pointer'

This patch fixes the warning generated by sparse: "Using plain integer
as NULL pointer" by replacing the offending 0s with NULL.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

Showing 3 changed files with 4 additions and 4 deletions Side-by-side Diff

drivers/staging/line6/capture.c
... ... @@ -147,7 +147,7 @@
147 147 const int bytes_per_frame = line6pcm->properties->bytes_per_frame;
148 148 int frames = fsize / bytes_per_frame;
149 149  
150   - if (runtime == 0)
  150 + if (runtime == NULL)
151 151 return;
152 152  
153 153 if (line6pcm->pos_in_done + frames > runtime->buffer_size) {
drivers/staging/line6/midi.c
... ... @@ -127,7 +127,7 @@
127 127  
128 128 urb = usb_alloc_urb(0, GFP_ATOMIC);
129 129  
130   - if (urb == 0) {
  130 + if (urb == NULL) {
131 131 dev_err(line6->ifcdev, "Out of memory\n");
132 132 return -ENOMEM;
133 133 }
... ... @@ -137,7 +137,7 @@
137 137  
138 138 transfer_buffer = kmalloc(length, GFP_ATOMIC);
139 139  
140   - if (transfer_buffer == 0) {
  140 + if (transfer_buffer == NULL) {
141 141 usb_free_urb(urb);
142 142 dev_err(line6->ifcdev, "Out of memory\n");
143 143 return -ENOMEM;
drivers/staging/line6/playback.c
... ... @@ -246,7 +246,7 @@
246 246  
247 247 change_volume(urb_out, line6pcm->volume_playback, bytes_per_frame);
248 248  
249   - if (line6pcm->prev_fbuf != 0) {
  249 + if (line6pcm->prev_fbuf != NULL) {
250 250 #ifdef CONFIG_LINE6_USB_IMPULSE_RESPONSE
251 251 if (line6pcm->flags & MASK_PCM_IMPULSE) {
252 252 create_impulse_test_signal(line6pcm, urb_out,