diff mbox series

media: intel/ipu6: Fix some redundant resources freeing in ipu6_pci_remove()

Message ID 33dbf7b5c1b1b94d64a13441b69e1ff976caaa62.1716198935.git.christophe.jaillet@wanadoo.fr (mailing list archive)
State New
Headers show
Series media: intel/ipu6: Fix some redundant resources freeing in ipu6_pci_remove() | expand

Commit Message

Christophe JAILLET May 20, 2024, 9:55 a.m. UTC
pcim_iomap_regions() and pcim_enable_device() are used in the probe. So
the corresponding managed resources don't need to be freed explicitly in
the remove function.

Remove the incorrect pci_release_regions() and pci_disable_device() calls.

Fixes: 25fedc021985 ("media: intel/ipu6: add Intel IPU6 PCI device driver")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
Compile tested only
---
 drivers/media/pci/intel/ipu6/ipu6.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Bingbu Cao May 20, 2024, 11:54 a.m. UTC | #1
Christophe,

Thanks for the patch.

On 5/20/24 5:55 PM, Christophe JAILLET wrote:
> pcim_iomap_regions() and pcim_enable_device() are used in the probe. So
> the corresponding managed resources don't need to be freed explicitly in
> the remove function.
> 
> Remove the incorrect pci_release_regions() and pci_disable_device() calls.
> 
> Fixes: 25fedc021985 ("media: intel/ipu6: add Intel IPU6 PCI device driver")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> Compile tested only
> ---
>  drivers/media/pci/intel/ipu6/ipu6.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/media/pci/intel/ipu6/ipu6.c b/drivers/media/pci/intel/ipu6/ipu6.c
> index d2bebd208461..f587f609259d 100644
> --- a/drivers/media/pci/intel/ipu6/ipu6.c
> +++ b/drivers/media/pci/intel/ipu6/ipu6.c
> @@ -727,9 +727,6 @@ static void ipu6_pci_remove(struct pci_dev *pdev)
>  	pm_runtime_forbid(&pdev->dev);
>  	pm_runtime_get_noresume(&pdev->dev);
>  
> -	pci_release_regions(pdev);
> -	pci_disable_device(pdev);
> -
>  	release_firmware(isp->cpd_fw);
>  
>  	ipu6_mmu_cleanup(psys_mmu);
>

Reviewed-by: Bingbu Cao <bingbu.cao@intel.com>
diff mbox series

Patch

diff --git a/drivers/media/pci/intel/ipu6/ipu6.c b/drivers/media/pci/intel/ipu6/ipu6.c
index d2bebd208461..f587f609259d 100644
--- a/drivers/media/pci/intel/ipu6/ipu6.c
+++ b/drivers/media/pci/intel/ipu6/ipu6.c
@@ -727,9 +727,6 @@  static void ipu6_pci_remove(struct pci_dev *pdev)
 	pm_runtime_forbid(&pdev->dev);
 	pm_runtime_get_noresume(&pdev->dev);
 
-	pci_release_regions(pdev);
-	pci_disable_device(pdev);
-
 	release_firmware(isp->cpd_fw);
 
 	ipu6_mmu_cleanup(psys_mmu);