ALSA: usb: caiaq: audio: Delete two error messages for a failed memory allocation in alloc_urbs()
PATCH 1/1 ALSA: usb: caiaq: audio: Delete two error messages for a failed memory allocation in alloc_urbs()
From: Markus Elfring <[email protected]>
Date: Fri, 11 Aug 2017 19:39:06 +0200
Omit extra messages for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Signed-off-by Markus Elfring <[email protected]>
--- sound/usb/caiaq/audio.c | 2 -- 1 file changed, 2 deletions(-)
sound/usb/caiaq/audio.c +0 -2
@@ -731,7 +731,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 +745,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; }
Signature · 1 line
2.14.0
Quoted 8 lines · SF Markus Elfring
From: Markus Elfring <[email protected]>
Date: Fri, 11 Aug 2017 19:39:06 +0200Omit extra messages for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Signed-off-by Markus Elfring <[email protected]>
Acked-by Daniel Mack <[email protected]>
Quoted 24 lines
--- sound/usb/caiaq/audio.c | 2 -- 1 file changed, 2 deletions(-)sound/usb/caiaq/audio.c +0
-2@@ -731,7 +731,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 +745,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; }
Takashi Iwai
AppliedQuoted 9 lines · SF Markus Elfring
From: Markus Elfring <[email protected]>
Date: Fri, 11 Aug 2017 19:39:06 +0200Omit extra messages for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Signed-off-by Markus Elfring <[email protected]>
Applied, thanks.
Takashi