Skip to content

Commit

Permalink
genhd must_check warning fix
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Roland McGrath authored and Linus Torvalds committed Mar 12, 2008
1 parent a8ae50b commit ee27a55
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion block/genhd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit ee27a55

Please sign in to comment.