mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] MCB Changes for 4.4
@ 2015-10-28  7:22 Johannes Thumshirn
  2015-10-28  7:22 ` [PATCH 1/2] mcb: Do not return zero on error path in mcb_pci_probe() Johannes Thumshirn
  2015-10-28  7:22 ` [PATCH 2/2] mcb: Destroy IDA on module unload Johannes Thumshirn
  0 siblings, 2 replies; 3+ messages in thread
From: Johannes Thumshirn @ 2015-10-28  7:22 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Johannes Thumshirn, Alexey Khoroshilov, linux-kernel

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(+)

-- 
2.6.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] mcb: Do not return zero on error path in mcb_pci_probe()
  2015-10-28  7:22 [PATCH 0/2] MCB Changes for 4.4 Johannes Thumshirn
@ 2015-10-28  7:22 ` Johannes Thumshirn
  2015-10-28  7:22 ` [PATCH 2/2] mcb: Destroy IDA on module unload Johannes Thumshirn
  1 sibling, 0 replies; 3+ messages in thread
From: Johannes Thumshirn @ 2015-10-28  7:22 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Johannes Thumshirn, Alexey Khoroshilov, linux-kernel

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 2/2] mcb: Destroy IDA on module unload
  2015-10-28  7:22 [PATCH 0/2] MCB Changes for 4.4 Johannes Thumshirn
  2015-10-28  7:22 ` [PATCH 1/2] mcb: Do not return zero on error path in mcb_pci_probe() Johannes Thumshirn
@ 2015-10-28  7:22 ` Johannes Thumshirn
  1 sibling, 0 replies; 3+ messages in thread
From: Johannes Thumshirn @ 2015-10-28  7:22 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Johannes Thumshirn, Alexey Khoroshilov, linux-kernel

Destroy mcb_ida on module_unload

Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
---
 drivers/mcb/mcb-core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mcb/mcb-core.c b/drivers/mcb/mcb-core.c
index 9018ab8..a4be451 100644
--- a/drivers/mcb/mcb-core.c
+++ b/drivers/mcb/mcb-core.c
@@ -409,6 +409,7 @@ static int mcb_init(void)
 
 static void mcb_exit(void)
 {
+	ida_destroy(&mcb_ida);
 	bus_unregister(&mcb_bus_type);
 }
 
-- 
2.6.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-10-28  7:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-28  7:22 [PATCH 0/2] MCB Changes for 4.4 Johannes Thumshirn
2015-10-28  7:22 ` [PATCH 1/2] mcb: Do not return zero on error path in mcb_pci_probe() Johannes Thumshirn
2015-10-28  7:22 ` [PATCH 2/2] mcb: Destroy IDA on module unload Johannes Thumshirn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome