diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2017-08-11 19:39:06 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2017-08-12 23:24:34 +0200 |
commit | b26113fa6ab5f78438c2918b333e0f1c78a471d5 (patch) | |
tree | 67708ed7cfd51c832f39a7b949969b651d52c632 /sound/usb | |
parent | 9ecb2406de33470b70b48a2e107730bd37547e31 (diff) |
ALSA: usb: caiaq: audio: Delete two error messages for a failed memory allocation in alloc_urbs()
Omit extra messages for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
[Fixed the unused variable warning by this change as well -- tiwai]
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Acked-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb')
-rw-r--r-- | sound/usb/caiaq/audio.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/sound/usb/caiaq/audio.c b/sound/usb/caiaq/audio.c index 8f66ba730d69..054645f4dde7 100644 --- a/sound/usb/caiaq/audio.c +++ b/sound/usb/caiaq/audio.c @@ -722,7 +722,6 @@ static struct urb **alloc_urbs(struct snd_usb_caiaqdev *cdev, int dir, int *ret) int i, frame; struct urb **urbs; struct usb_device *usb_dev = cdev->chip.dev; - struct device *dev = caiaqdev_to_dev(cdev); unsigned int pipe; pipe = (dir == SNDRV_PCM_STREAM_PLAYBACK) ? @@ -731,7 +730,6 @@ static struct urb **alloc_urbs(struct snd_usb_caiaqdev *cdev, int dir, int *ret) urbs = kmalloc(N_URBS * sizeof(*urbs), GFP_KERNEL); if (!urbs) { - dev_err(dev, "unable to kmalloc() urbs, OOM!?\n"); *ret = -ENOMEM; return NULL; } @@ -746,7 +744,6 @@ static struct urb **alloc_urbs(struct snd_usb_caiaqdev *cdev, int dir, int *ret) urbs[i]->transfer_buffer = kmalloc(FRAMES_PER_URB * BYTES_PER_FRAME, GFP_KERNEL); if (!urbs[i]->transfer_buffer) { - dev_err(dev, "unable to kmalloc() transfer buffer, OOM!?\n"); *ret = -ENOMEM; return urbs; } |