summaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia
diff options
context:
space:
mode:
authorRandy Dunlap <rdunlap@xenotime.net>2006-10-20 23:44:12 +0200
committerDominik Brodowski <linux@dominikbrodowski.net>2006-10-26 03:59:40 +0200
commitace7d4772cf056d9b13b51bd496a8be968774592 (patch)
tree516bc0c53799e92758c5a4b3c600788d7d2ec7ea /drivers/pcmcia
parent[PATCH] pcmcia: update alloc_io_space for conflict checking for multifunction... (diff)
downloadlinux-ace7d4772cf056d9b13b51bd496a8be968774592.tar.xz
linux-ace7d4772cf056d9b13b51bd496a8be968774592.zip
[PATCH] pcmcia/ds: driver layer error checking
Check driver layer return values in pcmcia/ds.c Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r--drivers/pcmcia/ds.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c
index 74b3124e8247..af392bfee5a6 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();