[<prev] [next>] [day] [month] [year] [list]
Message-Id: <200802112210.17467.lpotenza@inwind.it>
Date: Mon, 11 Feb 2008 22:10:17 +0100
From: Leonardo Potenza <lpotenza@...ind.it>
To: kernel-janitors@...r.kernel.org
Cc: axboe@...nel.dk, linux-kernel@...r.kernel.org
Subject: [PATCH] block/genhd.c: compilation warning fix
From: Leonardo Potenza <lpotenza@...ind.it>
Added a check for the class_register() return value.
Signed-off-by: Leonardo Potenza <lpotenza@...ind.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();
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists