Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1257737 > unrolled thread

[PATCH 1/2] mcb: Do not return zero on error path in mcb_pci_probe()

Started byJohannes Thumshirn <jthumshirn@suse.de>
First post2015-10-28 08:30 +0100
Last post2015-10-28 08:30 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 1/2] mcb: Do not return zero on error path in mcb_pci_probe() Johannes Thumshirn <jthumshirn@suse.de> - 2015-10-28 08:30 +0100

#1257737 — [PATCH 1/2] mcb: Do not return zero on error path in mcb_pci_probe()

FromJohannes Thumshirn <jthumshirn@suse.de>
Date2015-10-28 08:30 +0100
Subject[PATCH 1/2] mcb: Do not return zero on error path in mcb_pci_probe()
Message-ID<qotlg-82d-1@gated-at.bofh.it>
From: Alexey Khoroshilov <khoroshilov@ispras.ru>

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>
---
 drivers/mcb/mcb-pci.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mcb/mcb-pci.c b/drivers/mcb/mcb-pci.c
index 0516454..67d5e7d 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;
 	}
 
-- 
2.6.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web