* [PATCH -next] ALSA: nm256: Fix error return code in snd_nm256_create()
@ 2021-07-20 13:52 Yang Yingliang
2021-07-20 14:08 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Yang Yingliang @ 2021-07-20 13:52 UTC (permalink / raw)
To: linux-kernel, alsa-devel; +Cc: tiwai, perex
If pci_request_regions() fails, it should return error
code in snd_nm256_create().
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
sound/pci/nm256/nm256.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sound/pci/nm256/nm256.c b/sound/pci/nm256/nm256.c
index a54b9b26a0c2..c9c178504959 100644
--- a/sound/pci/nm256/nm256.c
+++ b/sound/pci/nm256/nm256.c
@@ -1478,7 +1478,8 @@ snd_nm256_create(struct snd_card *card, struct pci_dev *pci)
chip->buffer_addr = pci_resource_start(pci, 0);
chip->cport_addr = pci_resource_start(pci, 1);
- if (pci_request_regions(pci, card->driver))
+ err = pci_request_regions(pci, card->driver);
+ if (err < 0)
return err;
/* Init the memory port info. */
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] ALSA: nm256: Fix error return code in snd_nm256_create()
2021-07-20 13:52 [PATCH -next] ALSA: nm256: Fix error return code in snd_nm256_create() Yang Yingliang
@ 2021-07-20 14:08 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2021-07-20 14:08 UTC (permalink / raw)
To: Yang Yingliang; +Cc: linux-kernel, alsa-devel, tiwai, perex
On Tue, 20 Jul 2021 15:52:37 +0200,
Yang Yingliang wrote:
>
> If pci_request_regions() fails, it should return error
> code in snd_nm256_create().
>
> 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-07-20 14:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-20 13:52 [PATCH -next] ALSA: nm256: Fix error return code in snd_nm256_create() Yang Yingliang
2021-07-20 14:08 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).