[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240411-fix-smatch-v1-2-045f92467937@chromium.org>
Date: Thu, 11 Apr 2024 21:17:51 +0000
From: Ricardo Ribalda <ribalda@...omium.org>
To: Bluecherry Maintainers <maintainers@...echerrydvr.com>,
Anton Sviridenko <anton@...p.bluecherry.net>,
Andrey Utkin <andrey_utkin@...tmail.com>,
Ismael Luceno <ismael@...ev.co.uk>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Patrice Chotard <patrice.chotard@...s.st.com>
Cc: Hans Verkuil <hverkuil-cisco@...all.nl>, linux-media@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
Ricardo Ribalda <ribalda@...omium.org>
Subject: [PATCH 2/7] media: solo6x10: Use devm functions
Let devm handle the life cycle of the irq request.
Makes smatch happier:
drivers/media/pci/solo6x10/solo6x10-core.c:631 solo_pci_probe() warn: 'pdev' from pci_request_regions() not released on lines: 631.
Signed-off-by: Ricardo Ribalda <ribalda@...omium.org>
---
drivers/media/pci/solo6x10/solo6x10-core.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/media/pci/solo6x10/solo6x10-core.c b/drivers/media/pci/solo6x10/solo6x10-core.c
index abf30b7609e17..1a9e2bccc4136 100644
--- a/drivers/media/pci/solo6x10/solo6x10-core.c
+++ b/drivers/media/pci/solo6x10/solo6x10-core.c
@@ -144,7 +144,6 @@ static void free_solo_dev(struct solo_dev *solo_dev)
/* Now cleanup the PCI device */
solo_irq_off(solo_dev, ~0);
- free_irq(pdev->irq, solo_dev);
}
pci_disable_device(pdev);
@@ -544,8 +543,8 @@ static int solo_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
/* PLL locking time of 1ms */
mdelay(1);
- ret = request_irq(pdev->irq, solo_isr, IRQF_SHARED, SOLO6X10_NAME,
- solo_dev);
+ ret = devm_request_irq(&pdev->dev, pdev->irq, solo_isr, IRQF_SHARED,
+ SOLO6X10_NAME, solo_dev);
if (ret)
goto fail_probe;
--
2.44.0.683.g7961c838ac-goog
Powered by blists - more mailing lists