LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] block/genhd.c: compilation warning fix
@ 2008-02-11 21:10 Leonardo Potenza
0 siblings, 0 replies; only message in thread
From: Leonardo Potenza @ 2008-02-11 21:10 UTC (permalink / raw)
To: kernel-janitors; +Cc: axboe, linux-kernel
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();
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-02-11 21:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-11 21:10 [PATCH] block/genhd.c: compilation warning fix Leonardo Potenza
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).