Commit ace7d477 authored by Randy Dunlap's avatar Randy Dunlap Committed by Dominik Brodowski

[PATCH] pcmcia/ds: driver layer error checking

Check driver layer return values in pcmcia/ds.c
Signed-off-by: default avatarRandy Dunlap <rdunlap@xenotime.net>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarDominik Brodowski <linux@dominikbrodowski.net>
parent 4708b5fa
...@@ -1292,10 +1292,22 @@ struct bus_type pcmcia_bus_type = { ...@@ -1292,10 +1292,22 @@ struct bus_type pcmcia_bus_type = {
static int __init init_pcmcia_bus(void) static int __init init_pcmcia_bus(void)
{ {
int ret;
spin_lock_init(&pcmcia_dev_list_lock); spin_lock_init(&pcmcia_dev_list_lock);
bus_register(&pcmcia_bus_type); ret = bus_register(&pcmcia_bus_type);
class_interface_register(&pcmcia_bus_interface); 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(); pcmcia_setup_ioctl();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment