diff options
author | Randy Dunlap <rdunlap@xenotime.net> | 2006-10-20 17:44:12 -0400 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-10-25 21:59:40 -0400 |
commit | ace7d4772cf056d9b13b51bd496a8be968774592 (patch) | |
tree | 516bc0c53799e92758c5a4b3c600788d7d2ec7ea | |
parent | 4708b5faf7c53bb4128d34267bdfe4b8c74b488a (diff) |
[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>
-rw-r--r-- | 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 74b3124e8247..af392bfee5a6 100644 --- a/drivers/pcmcia/ds.c +++ b/drivers/pcmcia/ds.c | |||
@@ -1292,10 +1292,22 @@ struct bus_type pcmcia_bus_type = { | |||
1292 | 1292 | ||
1293 | static int __init init_pcmcia_bus(void) | 1293 | static int __init init_pcmcia_bus(void) |
1294 | { | 1294 | { |
1295 | int ret; | ||
1296 | |||
1295 | spin_lock_init(&pcmcia_dev_list_lock); | 1297 | spin_lock_init(&pcmcia_dev_list_lock); |
1296 | 1298 | ||
1297 | bus_register(&pcmcia_bus_type); | 1299 | ret = bus_register(&pcmcia_bus_type); |
1298 | class_interface_register(&pcmcia_bus_interface); | 1300 | if (ret < 0) { |
1301 | printk(KERN_WARNING "pcmcia: bus_register error: %d\n", ret); | ||
1302 | return ret; | ||
1303 | } | ||
1304 | ret = class_interface_register(&pcmcia_bus_interface); | ||
1305 | if (ret < 0) { | ||
1306 | printk(KERN_WARNING | ||
1307 | "pcmcia: class_interface_register error: %d\n", ret); | ||
1308 | bus_unregister(&pcmcia_bus_type); | ||
1309 | return ret; | ||
1310 | } | ||
1299 | 1311 | ||
1300 | pcmcia_setup_ioctl(); | 1312 | pcmcia_setup_ioctl(); |
1301 | 1313 | ||