From: Mike Rapoport Date: Sun, 17 Jan 2016 17:59:49 +0000 (+0200) Subject: staging: sm750fb: disable PCI device if lynxfb_pci_probe fails X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=0fbc7c505680ca6efe2486afb34866602781c980;p=deliverable%2Flinux.git 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 --- 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; }