projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
695794a
)
block: fix compiler warning in genhd.c
author
Greg Kroah-Hartman
<gregkh@suse.de>
Thu, 22 May 2008 21:21:08 +0000
(17:21 -0400)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Tue, 22 Jul 2008 04:54:48 +0000
(21:54 -0700)
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>
block/genhd.c
patch
|
blob
|
blame
|
history
diff --git
a/block/genhd.c
b/block/genhd.c
index 24e3fc9095fe454439c3108e0eae0a1d8e9a8b50..3ccf5c01756542db4fdb63a3005f9a25bc8e5c5f 100644
(file)
--- 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);