diff options
author | Roland McGrath <roland@redhat.com> | 2008-03-11 20:13:15 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-03-12 15:34:37 -0400 |
commit | ee27a558ae0ff5063ccd6c47ca102c0bb0e3ba27 (patch) | |
tree | dcf8c19fa113bf8bd1e8d5c97a4d527cc845e38d | |
parent | a8ae50ba9336ff77d0df0943ac27b79ba0a5a521 (diff) |
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>
-rw-r--r-- | block/genhd.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/block/genhd.c b/block/genhd.c index c44527d16c52..00da5219ee37 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) | |||
360 | 360 | ||
361 | static int __init genhd_device_init(void) | 361 | static int __init genhd_device_init(void) |
362 | { | 362 | { |
363 | class_register(&block_class); | 363 | int error = class_register(&block_class); |
364 | if (unlikely(error)) | ||
365 | return error; | ||
364 | bdev_map = kobj_map_init(base_probe, &block_class_lock); | 366 | bdev_map = kobj_map_init(base_probe, &block_class_lock); |
365 | blk_dev_init(); | 367 | blk_dev_init(); |
366 | 368 | ||