staging: sm750fb: disable PCI device if lynxfb_pci_probe fails
authorMike Rapoport <mike.rapoport@gmail.com>
Sun, 17 Jan 2016 17:59:49 +0000 (19:59 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Feb 2016 02:50:53 +0000 (18:50 -0800)
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 <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/sm750fb/sm750.c

index c78421b5b0e7c1b38ec26de22a3627acc1161fa4..c80b11c387ad08e8c50211f3c51548e508691ea1 100644 (file)
@@ -1132,6 +1132,7 @@ err_info0_alloc:
 err_map:
        kfree(sm750_dev);
 err_share:
+       pci_disable_device(pdev);
 err_enable:
        return -ENODEV;
 }
This page took 0.02571 seconds and 5 git commands to generate.