projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4d7dd8f
)
[PATCH] block: handle subsystem_register() init errors
author
Randy Dunlap
<
[email protected]
>
Fri, 29 Sep 2006 08:58:56 +0000
(
01:58
-0700)
committer
Linus Torvalds
<
[email protected]
>
Fri, 29 Sep 2006 16:18:05 +0000
(09:18 -0700)
Check and handle init errors.
Signed-off-by: Randy Dunlap <
[email protected]
>
Cc: Greg KH <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
block/genhd.c
patch
|
blob
|
history
diff --git
a/block/genhd.c
b/block/genhd.c
index 25d1f42568cc19714a2f8a5469ecd2842e9ea7e5..653919d50cd4d06aea68d8e027d15a473e5b4f5a 100644
(file)
--- 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);