mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 11:46:19 +00:00
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>
This commit is contained in:
parent
a8ae50ba93
commit
ee27a558ae
1 changed files with 3 additions and 1 deletions
|
@ -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();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue