From 0fbc7c505680ca6efe2486afb34866602781c980 Mon Sep 17 00:00:00 2001 From: Mike Rapoport Date: Sun, 17 Jan 2016 19:59:49 +0200 Subject: [PATCH] staging: sm750fb: disable PCI device if lynxfb_pci_probe fails In case of error during lynxfb_pci_probe, the function returned without calling pci_disable_device. Fix it by adding pci_disable_device on the error cleanup path. Signed-off-by: Mike Rapoport Signed-off-by: Greg Kroah-Hartman --- drivers/staging/sm750fb/sm750.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c index c78421b5b0e7..c80b11c387ad 100644 --- a/drivers/staging/sm750fb/sm750.c +++ b/drivers/staging/sm750fb/sm750.c @@ -1132,6 +1132,7 @@ err_info0_alloc: err_map: kfree(sm750_dev); err_share: + pci_disable_device(pdev); err_enable: return -ENODEV; } -- 2.30.2