diff options
author | Heloise NH <kernelpatch_update@163.com> | 2015-07-17 03:42:06 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-07-17 14:56:19 +0200 |
commit | 6986a0e2556df3dfb54c624b50b02936bd1e00ef (patch) | |
tree | a7f0c62d91149f9227b46c9480ee8d40f7f89091 /sound/pci/hda/hda_codec.c | |
parent | ALSA: aoa: Drop owner assignment from i2c_driver (diff) | |
download | linux-6986a0e2556df3dfb54c624b50b02936bd1e00ef.tar.xz linux-6986a0e2556df3dfb54c624b50b02936bd1e00ef.zip |
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: Heloise NH <kernelpatch_update@163.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_codec.c')
-rw-r--r-- | sound/pci/hda/hda_codec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 5de3c5d8c2c0..d78fa713c103 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; } } |