lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20061026021353.GE20473@dominikbrodowski.de>
Date:	Wed, 25 Oct 2006 22:13:53 -0400
From:	Dominik Brodowski <linux@...inikbrodowski.net>
To:	linux-pcmcia@...ts.infradead.org
Cc:	linux-kernel@...r.kernel.org, rdunlap@...otime.net
Subject: [RFC PATCH 4/11] pcmcia/ds: driver layer error checking

From: Randy Dunlap <rdunlap@...otime.net>
Date: Fri, 20 Oct 2006 14:44:12 -0700
Subject: [PATCH] pcmcia/ds: driver layer error checking

Check driver layer return values in pcmcia/ds.c

Signed-off-by: Randy Dunlap <rdunlap@...otime.net>
Signed-off-by: Andrew Morton <akpm@...l.org>
Signed-off-by: Dominik Brodowski <linux@...inikbrodowski.net>
---
 drivers/pcmcia/ds.c |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c
index 74b3124..af392bf 100644
--- a/drivers/pcmcia/ds.c
+++ b/drivers/pcmcia/ds.c
@@ -1292,10 +1292,22 @@ struct bus_type pcmcia_bus_type = {
 
 static int __init init_pcmcia_bus(void)
 {
+	int ret;
+
 	spin_lock_init(&pcmcia_dev_list_lock);
 
-	bus_register(&pcmcia_bus_type);
-	class_interface_register(&pcmcia_bus_interface);
+	ret = bus_register(&pcmcia_bus_type);
+	if (ret < 0) {
+		printk(KERN_WARNING "pcmcia: bus_register error: %d\n", ret);
+		return ret;
+	}
+	ret = class_interface_register(&pcmcia_bus_interface);
+	if (ret < 0) {
+		printk(KERN_WARNING
+			"pcmcia: class_interface_register error: %d\n", ret);
+		bus_unregister(&pcmcia_bus_type);
+		return ret;
+	}
 
 	pcmcia_setup_ioctl();
 
-- 
1.4.3

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ