1
0
Fork 0

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 <roland@redhat.com>
Acked-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
hifive-unleashed-5.1
Roland McGrath 2008-03-11 17:13:15 -07:00 committed by Linus Torvalds
parent a8ae50ba93
commit ee27a558ae
1 changed files with 3 additions and 1 deletions

View File

@ -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();