From: Roland McGrath Date: Wed, 12 Mar 2008 00:13:15 +0000 (-0700) Subject: genhd must_check warning fix X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ee27a558ae0ff5063ccd6c47ca102c0bb0e3ba27;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git 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 c44527d16c5..00da5219ee3 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();