Commit ee27a558 authored by Roland McGrath's avatar Roland McGrath Committed by Linus Torvalds

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: default avatarRoland McGrath <roland@redhat.com>
Acked-by: default avatarJeff Garzik <jeff@garzik.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent a8ae50ba
...@@ -360,7 +360,9 @@ static struct kobject *base_probe(dev_t devt, int *part, void *data) ...@@ -360,7 +360,9 @@ static struct kobject *base_probe(dev_t devt, int *part, void *data)
static int __init genhd_device_init(void) 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); bdev_map = kobj_map_init(base_probe, &block_class_lock);
blk_dev_init(); blk_dev_init();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment