mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-22 02:17:36 -04:00
media: marvell-cam: fix missing pci_disable_device() on remove
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: abfa3df36c ("[media] marvell-cam: Separate out the Marvell camera core")
Cc: stable@vger.kernel.org
Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
This commit is contained in:
committed by
Hans Verkuil
parent
a07c179a92
commit
033ff0420e
@@ -609,6 +609,7 @@ static void cafe_pci_remove(struct pci_dev *pdev)
|
||||
return;
|
||||
}
|
||||
cafe_shutdown(cam);
|
||||
pci_disable_device(pdev);
|
||||
kfree(cam);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user