ALSA: fm801: Fix missing pci_release_regions() on error in snd_fm801_create()
PATCH 1/1 ALSA: fm801: Fix missing pci_release_regions() on error in snd_fm801_create()
Fix the missing pci_release_regions() before return from snd_fm801_create() in the error handling case.
Reported-by Hulk Robot <[email protected]>
Signed-off-by Yang Yingliang <[email protected]>
--- sound/pci/fm801.c | 4 ++++ 1 file changed, 4 insertions(+)
sound/pci/fm801.c +4 -0
@@ -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 ) {
Signature · 1 line
2.25.1
Quoted 6 lines · Yang Yingliang
Fix the missing
pci_release_regions()before return fromsnd_fm801_create()in the error handling case.Reported-by Hulk Robot <[email protected]>Signed-off-by Yang Yingliang <[email protected]>
pci_regions() is manated in pcim_release(), hence you don't need to call it explicitly.
thanks,
Takashi
Quoted 9 lines · Takashi Iwai
Quoted 5 lines · Yang Yingliang
Fix the missing
pci_release_regions()before return fromsnd_fm801_create()in the error handling case.Reported-by Hulk Robot <[email protected]>Signed-off-by Yang Yingliang <[email protected]>
pci_regions()is manated inpcim_release(), hence you don't need to call it explicitly.
OK.
Thanks,
Yang
Quoted 6 lines
thanks,
Takashi
.