public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ALSA: hda: fix kstrdup return value
@ 2015-07-16  1:04 kernelpatch_update
  2015-07-16 10:27 ` Takashi Iwai
  0 siblings, 1 reply; 5+ messages in thread
From: kernelpatch_update @ 2015-07-16  1:04 UTC (permalink / raw)
  To: perex, tiwai, david.henningsson, kailang, hui.wang
  Cc: alsa-devel, linux-kernel, kernelpatch_update

In kstrdup we should return -ENOMEM when it reports an 
memory allocation failure, while the -ENODEV is referred
to a failure in finding the cpu node in the device tree.

Signed-off-by: kernelpatch_update <kernelpatch_update@163.com>
---
 sound/pci/hda/hda_codec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 5de3c5d..d78fa71 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -975,7 +975,7 @@ int snd_hda_codec_new(struct hda_bus *bus, struct snd_card *card,
 	if (codec->bus->modelname) {
 		codec->modelname = kstrdup(codec->bus->modelname, GFP_KERNEL);
 		if (!codec->modelname) {
-			err = -ENODEV;
+			err = -ENOMEM;
 			goto error;
 		}
 	}
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] ALSA: hda: fix kstrdup return value
  2015-07-16  1:04 [PATCH] ALSA: hda: fix kstrdup return value kernelpatch_update
@ 2015-07-16 10:27 ` Takashi Iwai
  2015-07-16 10:28   ` Takashi Iwai
  0 siblings, 1 reply; 5+ messages in thread
From: Takashi Iwai @ 2015-07-16 10:27 UTC (permalink / raw)
  To: kernelpatch_update
  Cc: perex, david.henningsson, kailang, hui.wang, alsa-devel,
	linux-kernel

On Thu, 16 Jul 2015 03:04:10 +0200,
kernelpatch_update wrote:
> 
> In kstrdup we should return -ENOMEM when it reports an 
> memory allocation failure, while the -ENODEV is referred
> to a failure in finding the cpu node in the device tree.
> 
> Signed-off-by: kernelpatch_update <kernelpatch_update@163.com>

Thanks, applied now.


Takashi

> ---
>  sound/pci/hda/hda_codec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
> index 5de3c5d..d78fa71 100644
> --- a/sound/pci/hda/hda_codec.c
> +++ b/sound/pci/hda/hda_codec.c
> @@ -975,7 +975,7 @@ int snd_hda_codec_new(struct hda_bus *bus, struct snd_card *card,
>  	if (codec->bus->modelname) {
>  		codec->modelname = kstrdup(codec->bus->modelname, GFP_KERNEL);
>  		if (!codec->modelname) {
> -			err = -ENODEV;
> +			err = -ENOMEM;
>  			goto error;
>  		}
>  	}
> -- 
> 1.9.1
> 
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ALSA: hda: fix kstrdup return value
  2015-07-16 10:27 ` Takashi Iwai
@ 2015-07-16 10:28   ` Takashi Iwai
  0 siblings, 0 replies; 5+ messages in thread
From: Takashi Iwai @ 2015-07-16 10:28 UTC (permalink / raw)
  To: kernelpatch_update
  Cc: perex, david.henningsson, kailang, hui.wang, alsa-devel,
	linux-kernel

On Thu, 16 Jul 2015 12:27:07 +0200,
Takashi Iwai wrote:
> 
> On Thu, 16 Jul 2015 03:04:10 +0200,
> kernelpatch_update wrote:
> > 
> > In kstrdup we should return -ENOMEM when it reports an 
> > memory allocation failure, while the -ENODEV is referred
> > to a failure in finding the cpu node in the device tree.
> > 
> > Signed-off-by: kernelpatch_update <kernelpatch_update@163.com>
> 
> Thanks, applied now.

Erm, no, sorry, it's not applicable.  The sign-off must contain the
real name.

Could you resubmit with the proper sign off?


thanks,

Takashi


> Takashi
> 
> > ---
> >  sound/pci/hda/hda_codec.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
> > index 5de3c5d..d78fa71 100644
> > --- a/sound/pci/hda/hda_codec.c
> > +++ b/sound/pci/hda/hda_codec.c
> > @@ -975,7 +975,7 @@ int snd_hda_codec_new(struct hda_bus *bus, struct snd_card *card,
> >  	if (codec->bus->modelname) {
> >  		codec->modelname = kstrdup(codec->bus->modelname, GFP_KERNEL);
> >  		if (!codec->modelname) {
> > -			err = -ENODEV;
> > +			err = -ENOMEM;
> >  			goto error;
> >  		}
> >  	}
> > -- 
> > 1.9.1
> > 
> > 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] ALSA: hda: fix kstrdup return value
@ 2015-07-17  1:42 Heloise NH
  2015-07-17 12:56 ` Takashi Iwai
  0 siblings, 1 reply; 5+ messages in thread
From: Heloise NH @ 2015-07-17  1:42 UTC (permalink / raw)
  To: perex, tiwai, david.henningsson, pshou, hui.wang
  Cc: alsa-devel, linux-kernel, kernelpatch_update

From: kernelpatch_update <kernelpatch_update@163.com>

In kstrdup we should return -ENOMEM when it reports an 
memory allocation failure, while the -ENODEV is referred
to a failure in finding the cpu node in the device tree.

Signed-off-by: Heloise NH <kernelpatch_update@163.com>
---
 sound/pci/hda/hda_codec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 5de3c5d..d78fa71 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -975,7 +975,7 @@ int snd_hda_codec_new(struct hda_bus *bus, struct snd_card *card,
 	if (codec->bus->modelname) {
 		codec->modelname = kstrdup(codec->bus->modelname, GFP_KERNEL);
 		if (!codec->modelname) {
-			err = -ENODEV;
+			err = -ENOMEM;
 			goto error;
 		}
 	}
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] ALSA: hda: fix kstrdup return value
  2015-07-17  1:42 Heloise NH
@ 2015-07-17 12:56 ` Takashi Iwai
  0 siblings, 0 replies; 5+ messages in thread
From: Takashi Iwai @ 2015-07-17 12:56 UTC (permalink / raw)
  To: Heloise NH
  Cc: perex, david.henningsson, pshou, hui.wang, alsa-devel,
	linux-kernel

On Fri, 17 Jul 2015 03:42:06 +0200,
Heloise NH wrote:
> 
> From: kernelpatch_update <kernelpatch_update@163.com>
> 
> In kstrdup we should return -ENOMEM when it reports an 
> memory allocation failure, while the -ENODEV is referred
> to a failure in finding the cpu node in the device tree.
> 
> Signed-off-by: Heloise NH <kernelpatch_update@163.com>

Thanks, applied.


Takashi

> ---
>  sound/pci/hda/hda_codec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
> index 5de3c5d..d78fa71 100644
> --- a/sound/pci/hda/hda_codec.c
> +++ b/sound/pci/hda/hda_codec.c
> @@ -975,7 +975,7 @@ int snd_hda_codec_new(struct hda_bus *bus, struct snd_card *card,
>  	if (codec->bus->modelname) {
>  		codec->modelname = kstrdup(codec->bus->modelname, GFP_KERNEL);
>  		if (!codec->modelname) {
> -			err = -ENODEV;
> +			err = -ENOMEM;
>  			goto error;
>  		}
>  	}
> -- 
> 1.9.1
> 
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-07-17 12:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-16  1:04 [PATCH] ALSA: hda: fix kstrdup return value kernelpatch_update
2015-07-16 10:27 ` Takashi Iwai
2015-07-16 10:28   ` Takashi Iwai
  -- strict thread matches above, loose matches on Subject: below --
2015-07-17  1:42 Heloise NH
2015-07-17 12:56 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox