media: saa7134: Use devm_request_irq

The handled version of request_irq let us remove the free_irq and makes
smatch happier:

drivers/media/pci/saa7134/saa7134-alsa.c:1186 alsa_card_saa7134_create() warn: 'dev->pci->irq' from request_irq() not released on lines: 1186

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
This commit is contained in:
Ricardo Ribalda 2024-04-11 21:17:52 +00:00 committed by Hans Verkuil
parent cfe22d41ee
commit 179559ed31

View File

@ -1096,9 +1096,6 @@ static void snd_saa7134_free(struct snd_card * card)
if (chip->dev->dmasound.priv_data == NULL)
return;
if (chip->irq >= 0)
free_irq(chip->irq, &chip->dev->dmasound);
chip->dev->dmasound.priv_data = NULL;
}
@ -1147,10 +1144,8 @@ static int alsa_card_saa7134_create(struct saa7134_dev *dev, int devnum)
chip->iobase = pci_resource_start(dev->pci, 0);
err = request_irq(dev->pci->irq, saa7134_alsa_irq,
IRQF_SHARED, dev->name,
(void*) &dev->dmasound);
err = devm_request_irq(&dev->pci->dev, dev->pci->irq, saa7134_alsa_irq,
IRQF_SHARED, dev->name, &dev->dmasound);
if (err < 0) {
pr_err("%s: can't get IRQ %d for ALSA\n",
dev->name, dev->pci->irq);