提交 ace7d477 编写于 作者: R Randy Dunlap 提交者: Dominik Brodowski

[PATCH] pcmcia/ds: driver layer error checking

Check driver layer return values in pcmcia/ds.c
Signed-off-by: NRandy Dunlap <rdunlap@xenotime.net>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NDominik Brodowski <linux@dominikbrodowski.net>
上级 4708b5fa
......@@ -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();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册