]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
pcmcia: pd6729: fix error return code in pd6729_pci_probe()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Fri, 7 Jun 2013 02:16:54 +0000 (10:16 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 9 Jun 2013 05:38:17 +0000 (22:38 -0700)
Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/pcmcia/pd6729.c

index b29d97e170aee91d2f0030d8947683d0c280cab7..a4c16ee5c7188d24bce41f834851f61f5e56d9ea 100644 (file)
@@ -644,6 +644,7 @@ static int pd6729_pci_probe(struct pci_dev *dev,
        if (!pci_resource_start(dev, 0)) {
                dev_warn(&dev->dev, "refusing to load the driver as the "
                        "io_base is NULL.\n");
+               ret = -ENOMEM;
                goto err_out_disable;
        }
 
@@ -673,6 +674,7 @@ static int pd6729_pci_probe(struct pci_dev *dev,
        mask = pd6729_isa_scan();
        if (irq_mode == 0 && mask == 0) {
                dev_warn(&dev->dev, "no ISA interrupt is available.\n");
+               ret = -ENODEV;
                goto err_out_free_res;
        }