From: Roland McGrath Date: Wed, 12 Mar 2008 00:13:15 +0000 (-0700) Subject: genhd must_check warning fix X-Git-Tag: v2.6.25-rc6~38 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ee27a558ae0ff5063ccd6c47ca102c0bb0e3ba27;p=linux-2.6 genhd must_check warning fix Fixes: block/genhd.c:361: warning: ignoring return value of ‘class_register’, declared with attribute warn_unused_result Signed-off-by: Roland McGrath Acked-by: Jeff Garzik Signed-off-by: Linus Torvalds --- diff --git a/block/genhd.c b/block/genhd.c index c44527d16c..00da5219ee 100644 --- a/block/genhd.c +++ b/block/genhd.c @@ -360,7 +360,9 @@ static struct kobject *base_probe(dev_t devt, int *part, void *data) static int __init genhd_device_init(void) { - class_register(&block_class); + int error = class_register(&block_class); + if (unlikely(error)) + return error; bdev_map = kobj_map_init(base_probe, &block_class_lock); blk_dev_init();