2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-11-18 23:54:26 +08:00

[PATCH] block: handle subsystem_register() init errors

Check and handle init errors.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Randy Dunlap 2006-09-29 01:58:56 -07:00 committed by Linus Torvalds
parent 4d7dd8fd95
commit 87a5726110

View File

@ -295,10 +295,15 @@ static struct kobject *base_probe(dev_t dev, int *part, void *data)
static int __init genhd_device_init(void)
{
int err;
bdev_map = kobj_map_init(base_probe, &block_subsys_lock);
blk_dev_init();
subsystem_register(&block_subsys);
return 0;
err = subsystem_register(&block_subsys);
if (err < 0)
printk(KERN_WARNING "%s: subsystem_register error: %d\n",
__FUNCTION__, err);
return err;
}
subsys_initcall(genhd_device_init);