diff mbox series

video: fbdev: cyber2000fb: fix missing pci_disable_device()

Message ID 20221024140028.2896689-1-yangyingliang@huawei.com (mailing list archive)
State Accepted, archived
Headers show
Series video: fbdev: cyber2000fb: fix missing pci_disable_device() | expand

Commit Message

Yang Yingliang Oct. 24, 2022, 2 p.m. UTC
Add missing pci_disable_device() in error path of probe() and remove() path.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 drivers/video/fbdev/cyber2000fb.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Helge Deller Oct. 27, 2022, 6:32 p.m. UTC | #1
On 10/24/22 16:00, Yang Yingliang wrote:
> Add missing pci_disable_device() in error path of probe() and remove() path.
>
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>

applied to fbdev tree.
Thanks!

Helge

> ---
>   drivers/video/fbdev/cyber2000fb.c | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/drivers/video/fbdev/cyber2000fb.c b/drivers/video/fbdev/cyber2000fb.c
> index 585af90a68a5..31ff1da82c05 100644
> --- a/drivers/video/fbdev/cyber2000fb.c
> +++ b/drivers/video/fbdev/cyber2000fb.c
> @@ -1796,6 +1796,7 @@ static int cyberpro_pci_probe(struct pci_dev *dev,
>   failed_regions:
>   	cyberpro_free_fb_info(cfb);
>   failed_release:
> +	pci_disable_device(dev);
>   	return err;
>   }
>
> @@ -1812,6 +1813,7 @@ static void cyberpro_pci_remove(struct pci_dev *dev)
>   			int_cfb_info = NULL;
>
>   		pci_release_regions(dev);
> +		pci_disable_device(dev);
>   	}
>   }
>
diff mbox series

Patch

diff --git a/drivers/video/fbdev/cyber2000fb.c b/drivers/video/fbdev/cyber2000fb.c
index 585af90a68a5..31ff1da82c05 100644
--- a/drivers/video/fbdev/cyber2000fb.c
+++ b/drivers/video/fbdev/cyber2000fb.c
@@ -1796,6 +1796,7 @@  static int cyberpro_pci_probe(struct pci_dev *dev,
 failed_regions:
 	cyberpro_free_fb_info(cfb);
 failed_release:
+	pci_disable_device(dev);
 	return err;
 }
 
@@ -1812,6 +1813,7 @@  static void cyberpro_pci_remove(struct pci_dev *dev)
 			int_cfb_info = NULL;
 
 		pci_release_regions(dev);
+		pci_disable_device(dev);
 	}
 }