From: "Randy.Dunlap" <rdunlap@xenotime.net>
To: lkml <linux-kernel@vger.kernel.org>
Cc: akpm <akpm@osdl.org>, axboe@suse.de
Subject: [PATCH -mm] block: handle subsystem_register init errors
Date: Tue, 11 Jul 2006 22:46:46 -0700 [thread overview]
Message-ID: <20060711224646.dc634553.rdunlap@xenotime.net> (raw)
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);
---
reply other threads:[~2006-07-12 5:45 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060711224646.dc634553.rdunlap@xenotime.net \
--to=rdunlap@xenotime.net \
--cc=akpm@osdl.org \
--cc=axboe@suse.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®