diff options
| author | Bingbu Cao <bingbu.cao@intel.com> | 2025-08-15 17:20:37 +0800 |
|---|---|---|
| committer | Hans Verkuil <hverkuil+cisco@kernel.org> | 2025-08-25 15:40:43 +0200 |
| commit | 01a80b6649e69e4889b8521de022d3ee4bc5cb6f (patch) | |
| tree | 46e782b2e392c21e9312aefceef087ea7d4f602e | |
| parent | media: staging/ipu7: Don't set name for IPU7 PCI device (diff) | |
| download | linux-01a80b6649e69e4889b8521de022d3ee4bc5cb6f.tar.gz linux-01a80b6649e69e4889b8521de022d3ee4bc5cb6f.zip | |
media: staging/ipu7: cleanup the MMU correctly in IPU7 driver release
IPU7 ISYS and PSYS auxiliary devices are released after
ipu7_bus_del_devices(), so driver can not reference the MMU devices
from ISYS and PSYS auxiliary devices, so move the MMUs cleanup before
releasing the auxiliary devices.
Fixes: b7fe4c0019b1 ("media: staging/ipu7: add Intel IPU7 PCI device driver")
Signed-off-by: Bingbu Cao <bingbu.cao@intel.com>
[Sakari Ailus: Drop extra newline.]
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
| -rw-r--r-- | drivers/staging/media/ipu7/ipu7.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/media/ipu7/ipu7.c b/drivers/staging/media/ipu7/ipu7.c index aef931d23510..ee6b63717ed3 100644 --- a/drivers/staging/media/ipu7/ipu7.c +++ b/drivers/staging/media/ipu7/ipu7.c @@ -2644,6 +2644,9 @@ static void ipu7_pci_remove(struct pci_dev *pdev) if (!IS_ERR_OR_NULL(isp->fw_code_region)) vfree(isp->fw_code_region); + ipu7_mmu_cleanup(isp->isys->mmu); + ipu7_mmu_cleanup(isp->psys->mmu); + ipu7_bus_del_devices(pdev); pm_runtime_forbid(&pdev->dev); @@ -2652,9 +2655,6 @@ static void ipu7_pci_remove(struct pci_dev *pdev) ipu_buttress_exit(isp); release_firmware(isp->cpd_fw); - - ipu7_mmu_cleanup(isp->psys->mmu); - ipu7_mmu_cleanup(isp->isys->mmu); } static void ipu7_pci_reset_prepare(struct pci_dev *pdev) |
