From: Peter Huewe Date: Tue, 7 Dec 2010 22:38:02 +0000 (+0100) Subject: staging/line6: Fix sparse warning 'Using plain integer as NULL pointer' X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=597a1e7cccc9a5a0c47629267ac4b23bf8654578;p=mv-sheeva.git 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/line6/capture.c b/drivers/staging/line6/capture.c index 1e3bb140633..9647154a492 100644 --- a/drivers/staging/line6/capture.c +++ b/drivers/staging/line6/capture.c @@ -147,7 +147,7 @@ void line6_capture_copy(struct snd_line6_pcm *line6pcm, char *fbuf, int fsize) const int bytes_per_frame = line6pcm->properties->bytes_per_frame; int frames = fsize / bytes_per_frame; - if (runtime == 0) + if (runtime == NULL) return; if (line6pcm->pos_in_done + frames > runtime->buffer_size) { diff --git a/drivers/staging/line6/midi.c b/drivers/staging/line6/midi.c index ab67e889d2c..e554a2da643 100644 --- a/drivers/staging/line6/midi.c +++ b/drivers/staging/line6/midi.c @@ -127,7 +127,7 @@ static int send_midi_async(struct usb_line6 *line6, unsigned char *data, urb = usb_alloc_urb(0, GFP_ATOMIC); - if (urb == 0) { + if (urb == NULL) { dev_err(line6->ifcdev, "Out of memory\n"); return -ENOMEM; } @@ -137,7 +137,7 @@ static int send_midi_async(struct usb_line6 *line6, unsigned char *data, transfer_buffer = kmalloc(length, GFP_ATOMIC); - if (transfer_buffer == 0) { + if (transfer_buffer == NULL) { usb_free_urb(urb); dev_err(line6->ifcdev, "Out of memory\n"); return -ENOMEM; diff --git a/drivers/staging/line6/playback.c b/drivers/staging/line6/playback.c index 29940fd1671..10c54383658 100644 --- a/drivers/staging/line6/playback.c +++ b/drivers/staging/line6/playback.c @@ -246,7 +246,7 @@ static int submit_audio_out_urb(struct snd_line6_pcm *line6pcm) change_volume(urb_out, line6pcm->volume_playback, bytes_per_frame); - if (line6pcm->prev_fbuf != 0) { + if (line6pcm->prev_fbuf != NULL) { #ifdef CONFIG_LINE6_USB_IMPULSE_RESPONSE if (line6pcm->flags & MASK_PCM_IMPULSE) { create_impulse_test_signal(line6pcm, urb_out,