* [PATCH -next] ALSA: ppc: fix error return code in snd_pmac_probe()
@ 2021-06-16 2:11 Yang Yingliang
2021-06-16 6:52 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Yang Yingliang @ 2021-06-16 2:11 UTC (permalink / raw)
To: linux-kernel, alsa-devel; +Cc: perex, tiwai, mpe
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] ALSA: ppc: fix error return code in snd_pmac_probe()
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
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2021-06-16 6:52 UTC (permalink / raw)
To: Yang Yingliang; +Cc: linux-kernel, alsa-devel, perex, tiwai, mpe
On Wed, 16 Jun 2021 04:11:21 +0200,
Yang Yingliang wrote:
>
> 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>
Thanks, applied.
Takashi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-06-16 6:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox