aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
Diffstat (limited to 'block')
-rw-r--r--block/genhd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/block/genhd.c b/block/genhd.c
index 24e3fc9095fe..3ccf5c017565 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -183,6 +183,7 @@ static int exact_lock(dev_t devt, void *data)
183void add_disk(struct gendisk *disk) 183void add_disk(struct gendisk *disk)
184{ 184{
185 struct backing_dev_info *bdi; 185 struct backing_dev_info *bdi;
186 int retval;
186 187
187 disk->flags |= GENHD_FL_UP; 188 disk->flags |= GENHD_FL_UP;
188 blk_register_region(MKDEV(disk->major, disk->first_minor), 189 blk_register_region(MKDEV(disk->major, disk->first_minor),
@@ -193,7 +194,8 @@ void add_disk(struct gendisk *disk)
193 194
194 bdi = &disk->queue->backing_dev_info; 195 bdi = &disk->queue->backing_dev_info;
195 bdi_register_dev(bdi, MKDEV(disk->major, disk->first_minor)); 196 bdi_register_dev(bdi, MKDEV(disk->major, disk->first_minor));
196 sysfs_create_link(&disk->dev.kobj, &bdi->dev->kobj, "bdi"); 197 retval = sysfs_create_link(&disk->dev.kobj, &bdi->dev->kobj, "bdi");
198 WARN_ON(retval);
197} 199}
198 200
199EXPORT_SYMBOL(add_disk); 201EXPORT_SYMBOL(add_disk);