summaryrefslogtreecommitdiffstats
path: root/block/genhd.c
diff options
context:
space:
mode:
authorRandy Dunlap <rdunlap@xenotime.net>2006-09-29 01:58:56 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-29 09:18:05 -0700
commit87a57261105669d13a9cae747b5b67ca1cbcda3c (patch)
treea82f6e81137ef987118e043040adac41599979b3 /block/genhd.c
parent4d7dd8fd9557840162b724a8ac1366dd78a12dff (diff)
downloadop-kernel-dev-87a57261105669d13a9cae747b5b67ca1cbcda3c.zip
op-kernel-dev-87a57261105669d13a9cae747b5b67ca1cbcda3c.tar.gz
[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>
Diffstat (limited to 'block/genhd.c')
-rw-r--r--block/genhd.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/block/genhd.c b/block/genhd.c
index 25d1f42..653919d 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -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);
OpenPOWER on IntegriCloud