[PATCH 5.10.y] media: marvell-cam: fix missing pci_disable_device() on remove
Sasha Levin <[email protected]> Tue, 4 Aug 2026 07:21:40 -0400
| Newsgroups | org.kernel.vger.stable |
|---|---|
| Message-ID | <[email protected]> |
From: Guangshuo Li <[email protected]> [ Upstream commit 033ff0420e4c9c240ae5523fff39770298efa964 ] During manual code audit, we found that cafe_pci_probe() enables the PCI device with pci_enable_device(), and its probe error path properly calls pci_disable_device() on failure. However, cafe_pci_remove() tears down the controller and frees the driver data without disabling the PCI device, leaving the remove path inconsistent with probe cleanup. Add the missing pci_disable_device() call to cafe_pci_remove(). Fixes: abfa3df36c01 ("[media] marvell-cam: Separate out the Marvell camera core") Cc: [email protected] Signed-off-by: Guangshuo Li <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Sasha Levin <[email protected]> --- drivers/media/platform/marvell-ccic/cafe-driver.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/platform/marvell-ccic/cafe-driver.c b/drivers/media/platform/marvell-ccic/cafe-driver.c index 00f623d62c962..062155ccfe910 100644 --- a/drivers/media/platform/marvell-ccic/cafe-driver.c +++ b/drivers/media/platform/marvell-ccic/cafe-driver.c @@ -600,6 +600,7 @@ static void cafe_pci_remove(struct pci_dev *pdev) return; } cafe_shutdown(cam); + pci_disable_device(pdev); kfree(cam); } -- 2.53.0