LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Leonardo Potenza <lpotenza@inwind.it>
To: kernel-janitors@vger.kernel.org
Cc: axboe@kernel.dk, linux-kernel@vger.kernel.org
Subject: [PATCH] block/genhd.c: compilation warning fix
Date: Mon, 11 Feb 2008 22:10:17 +0100 [thread overview]
Message-ID: <200802112210.17467.lpotenza@inwind.it> (raw)
From: Leonardo Potenza <lpotenza@inwind.it>
Added a check for the class_register() return value.
Signed-off-by: Leonardo Potenza <lpotenza@inwind.it>
---
The aim of this patch is to remove the following warning message:
block/genhd.c: In function 'genhd_device_init':
block/genhd.c:361: warning: ignoring return value of 'class_register', declared with attribute warn_unused_result
--- linux-2.6.orig/block/genhd.c
+++ linux-2.6/block/genhd.c
@@ -358,7 +358,12 @@ static struct kobject *base_probe(dev_t
static int __init genhd_device_init(void)
{
- class_register(&block_class);
+ int ret;
+
+ ret = class_register(&block_class);
+ if (ret != 0)
+ return ret;
+
bdev_map = kobj_map_init(base_probe, &block_class_lock);
blk_dev_init();
reply other threads:[~2008-02-11 21:10 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=200802112210.17467.lpotenza@inwind.it \
--to=lpotenza@inwind.it \
--cc=axboe@kernel.dk \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--subject='Re: [PATCH] block/genhd.c: compilation warning fix' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).