* [PATCH -mm] block: handle subsystem_register init errors
@ 2006-07-12 5:46 Randy.Dunlap
0 siblings, 0 replies; only message in thread
From: Randy.Dunlap @ 2006-07-12 5:46 UTC (permalink / raw)
To: lkml; +Cc: akpm, axboe
From: Randy Dunlap <rdunlap@xenotime.net>
Check and handle init errors.
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
---
block/genhd.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
--- linux-2618-rc1mm1.orig/block/genhd.c
+++ linux-2618-rc1mm1/block/genhd.c
@@ -295,10 +295,15 @@ static struct kobject *base_probe(dev_t
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);
---
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-07-12 5:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-12 5:46 [PATCH -mm] block: handle subsystem_register init errors Randy.Dunlap
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®