From: Yang Yingliang <yangyingliang@huawei.com> To: <linux-kernel@vger.kernel.org>, <alsa-devel@alsa-project.org> Cc: <perex@perex.cz>, <tiwai@suse.com>, <mpe@ellerman.id.au> Subject: [PATCH -next] ALSA: ppc: fix error return code in snd_pmac_probe() Date: Wed, 16 Jun 2021 10:11:21 +0800 [thread overview] Message-ID: <20210616021121.1991502-1-yangyingliang@huawei.com> (raw) If snd_pmac_tumbler_init() or snd_pmac_tumbler_post_init() fails, snd_pmac_probe() need return error code. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> --- sound/ppc/powermac.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sound/ppc/powermac.c b/sound/ppc/powermac.c index 1d2865c43d4b..db414b61157e 100644 --- a/sound/ppc/powermac.c +++ b/sound/ppc/powermac.c @@ -79,7 +79,11 @@ static int snd_pmac_probe(struct platform_device *devptr) sprintf(card->shortname, "PowerMac %s", name_ext); sprintf(card->longname, "%s (Dev %d) Sub-frame %d", card->shortname, chip->device_id, chip->subframe); - if ( snd_pmac_tumbler_init(chip) < 0 || snd_pmac_tumbler_post_init() < 0) + err = snd_pmac_tumbler_init(chip); + if (err < 0) + goto __error; + err = snd_pmac_tumbler_post_init(); + if (err < 0) goto __error; break; case PMAC_AWACS: -- 2.25.1
WARNING: multiple messages have this Message-ID (diff)
From: Yang Yingliang <yangyingliang@huawei.com> To: <linux-kernel@vger.kernel.org>, <alsa-devel@alsa-project.org> Cc: mpe@ellerman.id.au, tiwai@suse.com Subject: [PATCH -next] ALSA: ppc: fix error return code in snd_pmac_probe() Date: Wed, 16 Jun 2021 10:11:21 +0800 [thread overview] Message-ID: <20210616021121.1991502-1-yangyingliang@huawei.com> (raw) If snd_pmac_tumbler_init() or snd_pmac_tumbler_post_init() fails, snd_pmac_probe() need return error code. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> --- sound/ppc/powermac.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sound/ppc/powermac.c b/sound/ppc/powermac.c index 1d2865c43d4b..db414b61157e 100644 --- a/sound/ppc/powermac.c +++ b/sound/ppc/powermac.c @@ -79,7 +79,11 @@ static int snd_pmac_probe(struct platform_device *devptr) sprintf(card->shortname, "PowerMac %s", name_ext); sprintf(card->longname, "%s (Dev %d) Sub-frame %d", card->shortname, chip->device_id, chip->subframe); - if ( snd_pmac_tumbler_init(chip) < 0 || snd_pmac_tumbler_post_init() < 0) + err = snd_pmac_tumbler_init(chip); + if (err < 0) + goto __error; + err = snd_pmac_tumbler_post_init(); + if (err < 0) goto __error; break; case PMAC_AWACS: -- 2.25.1
next reply other threads:[~2021-06-16 2:07 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-06-16 2:11 Yang Yingliang [this message] 2021-06-16 2:11 ` [PATCH -next] ALSA: ppc: fix error return code in snd_pmac_probe() Yang Yingliang 2021-06-16 6:52 ` Takashi Iwai 2021-06-16 6:52 ` 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=20210616021121.1991502-1-yangyingliang@huawei.com \ --to=yangyingliang@huawei.com \ --cc=alsa-devel@alsa-project.org \ --cc=linux-kernel@vger.kernel.org \ --cc=mpe@ellerman.id.au \ --cc=perex@perex.cz \ --cc=tiwai@suse.com \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.