ALSA: hda: fix kstrdup return value
PATCH 1/1 ALSA: hda: fix kstrdup return value
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 <[email protected]>
--- sound/pci/hda/hda_codec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/pci/hda/hda_codec.c +1 -1
@@ -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; } }
Signature · 1 line
1.9.1
Takashi Iwai
AppliedQuoted 6 lines · kernelpatch_update
In kstrdup we should return
-ENOMEMwhen it reports an memory allocation failure, while the-ENODEVis referred to a failure in finding the cpu node in the device tree.Signed-off-by kernelpatch_update <[email protected]>
Thanks, applied now.
Takashi
Quoted 21 lines
--- sound/pci/hda/hda_codec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)sound/pci/hda/hda_codec.c +1
-1@@ -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; } }Signature · 1 line
1.9.1
Quoted 11 lines · Takashi Iwai
Quoted 6 lines · kernelpatch_update
In kstrdup we should return
-ENOMEMwhen it reports an memory allocation failure, while the-ENODEVis referred to a failure in finding the cpu node in the device tree.Signed-off-by kernelpatch_update <[email protected]>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
Quoted 23 lines
Takashi
Quoted 21 lines
--- sound/pci/hda/hda_codec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)sound/pci/hda/hda_codec.c +1
-1@@ -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; } }Signature · 1 line
1.9.1