Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1185168 > unrolled thread

[PATCH] ALSA: hda: fix kstrdup return value

Started bykernelpatch_update <kernelpatch_update@163.com>
First post2015-07-16 03:10 +0200
Last post2015-07-16 12:30 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] ALSA: hda: fix kstrdup return value kernelpatch_update <kernelpatch_update@163.com> - 2015-07-16 03:10 +0200
    Re: [PATCH] ALSA: hda: fix kstrdup return value Takashi Iwai <tiwai@suse.de> - 2015-07-16 12:30 +0200
    Re: [PATCH] ALSA: hda: fix kstrdup return value Takashi Iwai <tiwai@suse.de> - 2015-07-16 12:30 +0200

#1185168 — [PATCH] ALSA: hda: fix kstrdup return value

Fromkernelpatch_update <kernelpatch_update@163.com>
Date2015-07-16 03:10 +0200
Subject[PATCH] ALSA: hda: fix kstrdup return value
Message-ID<pMFQu-86K-11@gated-at.bofh.it>
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


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1185701

FromTakashi Iwai <tiwai@suse.de>
Date2015-07-16 12:30 +0200
Message-ID<pMOAp-3Pj-1@gated-at.bofh.it>
In reply to#1185168
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
> > 
> > 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1185707

FromTakashi Iwai <tiwai@suse.de>
Date2015-07-16 12:30 +0200
Message-ID<pMOAp-3Pj-3@gated-at.bofh.it>
In reply to#1185168
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
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web