X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=block%2Fgenhd.c;h=00da5219ee37c02a066d45e6ceefa65d9606d5e6;hb=a4928cffe6435caf427ae673131a633c1329dbf3;hp=c44527d16c52d66058ca434e8c6e5af05b8874c6;hpb=b881502666783b2d9ca2fc7a056d0f773073a808;p=linux-2.6-omap-h63xx.git 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();