* [PATCH -next] ALSA: fm801: Fix missing pci_release_regions() on error in snd_fm801_create()
@ 2021-06-16 2:55 ` Yang Yingliang
0 siblings, 0 replies; 6+ messages in thread
From: Yang Yingliang @ 2021-06-16 2:55 UTC (permalink / raw)
To: linux-kernel, alsa-devel; +Cc: perex, tiwai, broonie
Fix the missing pci_release_regions() before return
from snd_fm801_create() in the error handling case.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
sound/pci/fm801.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/sound/pci/fm801.c b/sound/pci/fm801.c
index ed9dae87145b..adac9c6a67f0 100644
--- a/sound/pci/fm801.c
+++ b/sound/pci/fm801.c
@@ -1254,6 +1254,7 @@ static int snd_fm801_create(struct snd_card *card,
IRQF_SHARED, KBUILD_MODNAME, chip)) {
dev_err(card->dev, "unable to grab IRQ %d\n", pci->irq);
snd_fm801_free(chip);
+ pci_release_regions(pci);
return -EBUSY;
}
chip->irq = pci->irq;
@@ -1266,6 +1267,7 @@ static int snd_fm801_create(struct snd_card *card,
err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops);
if (err < 0) {
snd_fm801_free(chip);
+ pci_release_regions(pci);
return err;
}
@@ -1273,6 +1275,7 @@ static int snd_fm801_create(struct snd_card *card,
err = v4l2_device_register(&pci->dev, &chip->v4l2_dev);
if (err < 0) {
snd_fm801_free(chip);
+ pci_release_regions(pci);
return err;
}
chip->tea.v4l2_dev = &chip->v4l2_dev;
@@ -1285,6 +1288,7 @@ static int snd_fm801_create(struct snd_card *card,
if (snd_tea575x_init(&chip->tea, THIS_MODULE)) {
dev_err(card->dev, "TEA575x radio not found\n");
snd_fm801_free(chip);
+ pci_release_regions(pci);
return -ENODEV;
}
} else if ((chip->tea575x_tuner & TUNER_TYPE_MASK) == 0) {
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH -next] ALSA: fm801: Fix missing pci_release_regions() on error in snd_fm801_create()
@ 2021-06-16 2:55 ` Yang Yingliang
0 siblings, 0 replies; 6+ messages in thread
From: Yang Yingliang @ 2021-06-16 2:55 UTC (permalink / raw)
To: linux-kernel, alsa-devel; +Cc: broonie, tiwai
Fix the missing pci_release_regions() before return
from snd_fm801_create() in the error handling case.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
sound/pci/fm801.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/sound/pci/fm801.c b/sound/pci/fm801.c
index ed9dae87145b..adac9c6a67f0 100644
--- a/sound/pci/fm801.c
+++ b/sound/pci/fm801.c
@@ -1254,6 +1254,7 @@ static int snd_fm801_create(struct snd_card *card,
IRQF_SHARED, KBUILD_MODNAME, chip)) {
dev_err(card->dev, "unable to grab IRQ %d\n", pci->irq);
snd_fm801_free(chip);
+ pci_release_regions(pci);
return -EBUSY;
}
chip->irq = pci->irq;
@@ -1266,6 +1267,7 @@ static int snd_fm801_create(struct snd_card *card,
err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops);
if (err < 0) {
snd_fm801_free(chip);
+ pci_release_regions(pci);
return err;
}
@@ -1273,6 +1275,7 @@ static int snd_fm801_create(struct snd_card *card,
err = v4l2_device_register(&pci->dev, &chip->v4l2_dev);
if (err < 0) {
snd_fm801_free(chip);
+ pci_release_regions(pci);
return err;
}
chip->tea.v4l2_dev = &chip->v4l2_dev;
@@ -1285,6 +1288,7 @@ static int snd_fm801_create(struct snd_card *card,
if (snd_tea575x_init(&chip->tea, THIS_MODULE)) {
dev_err(card->dev, "TEA575x radio not found\n");
snd_fm801_free(chip);
+ pci_release_regions(pci);
return -ENODEV;
}
} else if ((chip->tea575x_tuner & TUNER_TYPE_MASK) == 0) {
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH -next] ALSA: fm801: Fix missing pci_release_regions() on error in snd_fm801_create()
2021-06-16 2:55 ` Yang Yingliang
@ 2021-06-16 6:50 ` Takashi Iwai
-1 siblings, 0 replies; 6+ messages in thread
From: Takashi Iwai @ 2021-06-16 6:50 UTC (permalink / raw)
To: Yang Yingliang; +Cc: linux-kernel, alsa-devel, perex, tiwai, broonie
On Wed, 16 Jun 2021 04:55:07 +0200,
Yang Yingliang wrote:
>
> Fix the missing pci_release_regions() before return
> from snd_fm801_create() in the error handling case.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
pci_regions() is manated in pcim_release(), hence you don't need to
call it explicitly.
thanks,
Takashi
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH -next] ALSA: fm801: Fix missing pci_release_regions() on error in snd_fm801_create()
@ 2021-06-16 6:50 ` Takashi Iwai
0 siblings, 0 replies; 6+ messages in thread
From: Takashi Iwai @ 2021-06-16 6:50 UTC (permalink / raw)
To: Yang Yingliang; +Cc: alsa-devel, tiwai, broonie, linux-kernel
On Wed, 16 Jun 2021 04:55:07 +0200,
Yang Yingliang wrote:
>
> Fix the missing pci_release_regions() before return
> from snd_fm801_create() in the error handling case.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
pci_regions() is manated in pcim_release(), hence you don't need to
call it explicitly.
thanks,
Takashi
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH -next] ALSA: fm801: Fix missing pci_release_regions() on error in snd_fm801_create()
2021-06-16 6:50 ` Takashi Iwai
@ 2021-06-16 7:02 ` Yang Yingliang
-1 siblings, 0 replies; 6+ messages in thread
From: Yang Yingliang @ 2021-06-16 7:02 UTC (permalink / raw)
To: Takashi Iwai; +Cc: linux-kernel, alsa-devel, perex, tiwai, broonie
On 2021/6/16 14:50, Takashi Iwai wrote:
> On Wed, 16 Jun 2021 04:55:07 +0200,
> Yang Yingliang wrote:
>> Fix the missing pci_release_regions() before return
>> from snd_fm801_create() in the error handling case.
>>
>> Reported-by: Hulk Robot <hulkci@huawei.com>
>> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> pci_regions() is manated in pcim_release(), hence you don't need to
> call it explicitly.
OK.
Thanks,
Yang
>
>
> thanks,
>
> Takashi
> .
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH -next] ALSA: fm801: Fix missing pci_release_regions() on error in snd_fm801_create()
@ 2021-06-16 7:02 ` Yang Yingliang
0 siblings, 0 replies; 6+ messages in thread
From: Yang Yingliang @ 2021-06-16 7:02 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel, tiwai, broonie, linux-kernel
On 2021/6/16 14:50, Takashi Iwai wrote:
> On Wed, 16 Jun 2021 04:55:07 +0200,
> Yang Yingliang wrote:
>> Fix the missing pci_release_regions() before return
>> from snd_fm801_create() in the error handling case.
>>
>> Reported-by: Hulk Robot <hulkci@huawei.com>
>> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> pci_regions() is manated in pcim_release(), hence you don't need to
> call it explicitly.
OK.
Thanks,
Yang
>
>
> thanks,
>
> Takashi
> .
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-06-16 7:03 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-16 2:55 [PATCH -next] ALSA: fm801: Fix missing pci_release_regions() on error in snd_fm801_create() Yang Yingliang
2021-06-16 2:55 ` Yang Yingliang
2021-06-16 6:50 ` Takashi Iwai
2021-06-16 6:50 ` Takashi Iwai
2021-06-16 7:02 ` Yang Yingliang
2021-06-16 7:02 ` Yang Yingliang
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.