summaryrefslogtreecommitdiff
path: root/drivers/mcb
diff options
context:
space:
mode:
authorAlexey Khoroshilov <khoroshilov@ispras.ru>2015-10-28 10:22:15 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-10-29 03:02:16 +0300
commitbf25c19979b2ee1019201b809e93b6bca9947cfd (patch)
tree88ec6e0799f09ca513b4b3b61210e9f0fdca37a9 /drivers/mcb
parent213dd193fab8288e2b0b96dc93f974ec33ba2298 (diff)
downloadlinux-bf25c19979b2ee1019201b809e93b6bca9947cfd.tar.xz
mcb: Do not return zero on error path in mcb_pci_probe()
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>
Diffstat (limited to 'drivers/mcb')
-rw-r--r--drivers/mcb/mcb-pci.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mcb/mcb-pci.c b/drivers/mcb/mcb-pci.c
index 051645498b53..67d5e7d08df6 100644
--- a/drivers/mcb/mcb-pci.c
+++ b/drivers/mcb/mcb-pci.c
@@ -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;
}