diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2008-05-22 17:21:08 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-07-21 21:54:48 -0700 |
commit | 6ffeea77ff014f1456fcd0564eac84b34e9535ca (patch) | |
tree | 250c2ed78d430db765a73f0432ea7fb5a55dc4cf /block/genhd.c | |
parent | 695794ae0c5bdd9bd06e35b118801e2e9be04f9e (diff) | |
download | op-kernel-dev-6ffeea77ff014f1456fcd0564eac84b34e9535ca.zip op-kernel-dev-6ffeea77ff014f1456fcd0564eac84b34e9535ca.tar.gz |
block: fix compiler warning in genhd.c
Warn if something really bad happens if we can't create this link.
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'block/genhd.c')
-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 24e3fc9..3ccf5c0 100644 --- a/block/genhd.c +++ b/block/genhd.c @@ -183,6 +183,7 @@ static int exact_lock(dev_t devt, void *data) void add_disk(struct gendisk *disk) { struct backing_dev_info *bdi; + int retval; disk->flags |= GENHD_FL_UP; blk_register_region(MKDEV(disk->major, disk->first_minor), @@ -193,7 +194,8 @@ void add_disk(struct gendisk *disk) bdi = &disk->queue->backing_dev_info; bdi_register_dev(bdi, MKDEV(disk->major, disk->first_minor)); - sysfs_create_link(&disk->dev.kobj, &bdi->dev->kobj, "bdi"); + retval = sysfs_create_link(&disk->dev.kobj, &bdi->dev->kobj, "bdi"); + WARN_ON(retval); } EXPORT_SYMBOL(add_disk); |