From: Takashi Iwai <tiwai@suse.de>
To: kernelpatch_update <kernelpatch_update@163.com>
Cc: perex@perex.cz, david.henningsson@canonical.com,
kailang@realtek.com, hui.wang@canonical.com,
alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ALSA: hda: fix kstrdup return value
Date: Thu, 16 Jul 2015 12:27:07 +0200 [thread overview]
Message-ID: <s5ha8uwl7no.wl-tiwai@suse.de> (raw)
In-Reply-To: <1437008650-23478-1-git-send-email-kernelpatch_update@163.com>
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
>
>
next prev parent reply other threads:[~2015-07-16 10:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-16 1:04 kernelpatch_update
2015-07-16 10:27 ` Takashi Iwai [this message]
2015-07-16 10:28 ` Takashi Iwai
2015-07-17 1:42 Heloise NH
2015-07-17 12:56 ` Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=s5ha8uwl7no.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=david.henningsson@canonical.com \
--cc=hui.wang@canonical.com \
--cc=kailang@realtek.com \
--cc=kernelpatch_update@163.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®