Skip to contentSkip to conversation

MCB Changes for 4.4

PATCH New Johannes Thumshirn 1 participant 3 messages Oct 28, 2015 Men chameleon bus (mcb)

lore
Share & tools
lore
#0 lore raw

cover MCB Changes for 4.4

Hi Greg,

These are the MCB Changes for 4.4.

Alexey Khoroshilov (1):
mcb: Do not return zero on error path in mcb_pci_probe()

Johannes Thumshirn (1):
mcb: Destroy IDA on module unload

 drivers/mcb/mcb-core.c | 1 +
 drivers/mcb/mcb-pci.c  | 1 +
 2 files changed, 2 insertions(+)
Signature · 1 line
2.6.2
#1 lore raw

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

From: Alexey Khoroshilov <[email protected]>

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).

---
 drivers/mcb/mcb-pci.c | 1 +
 1 file changed, 1 insertion(+)
drivers/mcb/mcb-pci.c +1 -0
index 0516454..67d5e7d 100644
@@ -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;
 	}
 
Signature · 1 line
2.6.2
#2 lore raw

PATCH 2/2 mcb: Destroy IDA on module unload

In reply to Johannes Thumshirn

Destroy mcb_ida on module_unload

---
 drivers/mcb/mcb-core.c | 1 +
 1 file changed, 1 insertion(+)
drivers/mcb/mcb-core.c +1 -0
index 9018ab8..a4be451 100644
@@ -409,6 +409,7 @@ static int mcb_init(void)
 
 static void mcb_exit(void)
 {
+	ida_destroy(&mcb_ida);
 	bus_unregister(&mcb_bus_type);
 }
 
Signature · 1 line
2.6.2