]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mcb: Do not return zero on error path in mcb_pci_probe()
authorAlexey Khoroshilov <khoroshilov@ispras.ru>
Wed, 28 Oct 2015 07:22:15 +0000 (08:22 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Oct 2015 00:02:16 +0000 (09:02 +0900)
There is an error path in mcb_pci_probe() where
it returns zero instead of error code.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mcb/mcb-pci.c

index 051645498b53f8931e6f1db9a11aeb65e61ac2fd..67d5e7d08df65cd0bb75044970d1f2db58960c18 100644 (file)
@@ -51,6 +51,7 @@ static int mcb_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
        priv->mapbase = pci_resource_start(pdev, 0);
        if (!priv->mapbase) {
                dev_err(&pdev->dev, "No PCI resource\n");
+               ret = -ENODEV;
                goto out_disable;
        }