* [PATCH] ALSA: usb: caiaq: audio: Delete two error messages for a failed memory allocation in alloc_urbs()
@ 2017-08-11 18:00 SF Markus Elfring
2017-08-12 7:30 ` Daniel Mack
2017-08-12 21:22 ` Takashi Iwai
0 siblings, 2 replies; 3+ messages in thread
From: SF Markus Elfring @ 2017-08-11 18:00 UTC (permalink / raw)
To: alsa-devel, Daniel Mack, Jaroslav Kysela, Takashi Iwai
Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
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 <elfring@users.sourceforge.net>
---
sound/usb/caiaq/audio.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/sound/usb/caiaq/audio.c b/sound/usb/caiaq/audio.c
index 8f66ba730d69..1f306155e76a 100644
--- a/sound/usb/caiaq/audio.c
+++ b/sound/usb/caiaq/audio.c
@@ -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;
}
--
2.14.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ALSA: usb: caiaq: audio: Delete two error messages for a failed memory allocation in alloc_urbs()
2017-08-11 18:00 [PATCH] ALSA: usb: caiaq: audio: Delete two error messages for a failed memory allocation in alloc_urbs() SF Markus Elfring
@ 2017-08-12 7:30 ` Daniel Mack
2017-08-12 21:22 ` Takashi Iwai
1 sibling, 0 replies; 3+ messages in thread
From: Daniel Mack @ 2017-08-12 7:30 UTC (permalink / raw)
To: SF Markus Elfring, alsa-devel, Daniel Mack, Jaroslav Kysela,
Takashi Iwai
Cc: LKML, kernel-janitors
On 08/11/2017 08:00 PM, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> 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 <elfring@users.sourceforge.net>
Acked-by: Daniel Mack <daniel@zonque.org>
> ---
> sound/usb/caiaq/audio.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/sound/usb/caiaq/audio.c b/sound/usb/caiaq/audio.c
> index 8f66ba730d69..1f306155e76a 100644
> --- a/sound/usb/caiaq/audio.c
> +++ b/sound/usb/caiaq/audio.c
> @@ -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;
> }
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ALSA: usb: caiaq: audio: Delete two error messages for a failed memory allocation in alloc_urbs()
2017-08-11 18:00 [PATCH] ALSA: usb: caiaq: audio: Delete two error messages for a failed memory allocation in alloc_urbs() SF Markus Elfring
2017-08-12 7:30 ` Daniel Mack
@ 2017-08-12 21:22 ` Takashi Iwai
1 sibling, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2017-08-12 21:22 UTC (permalink / raw)
To: SF Markus Elfring
Cc: alsa-devel, Daniel Mack, Jaroslav Kysela, kernel-janitors, LKML
On Fri, 11 Aug 2017 20:00:30 +0200,
SF Markus Elfring wrote:
>
> From: Markus Elfring <elfring@users.sourceforge.net>
> 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 <elfring@users.sourceforge.net>
Applied, thanks.
Takashi
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-08-12 21:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-11 18:00 [PATCH] ALSA: usb: caiaq: audio: Delete two error messages for a failed memory allocation in alloc_urbs() SF Markus Elfring
2017-08-12 7:30 ` Daniel Mack
2017-08-12 21:22 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).