aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/loop.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-05-05 21:52:57 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2013-05-07 02:16:21 -0400
commitdb2a144bedd58b3dcf19950c2f476c58c9f39d18 (patch)
tree931f1b5a8e6bafe388b317bce02a9fd9af309d38 /drivers/block/loop.c
parenta8ca889ed9585894d53fd8919d80cbe8baff09e7 (diff)
block_device_operations->release() should return void
The value passed is 0 in all but "it can never happen" cases (and those only in a couple of drivers) *and* it would've been lost on the way out anyway, even if something tried to pass something meaningful. Just don't bother. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/block/loop.c')
-rw-r--r--drivers/block/loop.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index b2955b3f2cbc..d92d50fd84b7 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -1518,7 +1518,7 @@ out:
1518 return err; 1518 return err;
1519} 1519}
1520 1520
1521static int lo_release(struct gendisk *disk, fmode_t mode) 1521static void lo_release(struct gendisk *disk, fmode_t mode)
1522{ 1522{
1523 struct loop_device *lo = disk->private_data; 1523 struct loop_device *lo = disk->private_data;
1524 int err; 1524 int err;
@@ -1535,7 +1535,7 @@ static int lo_release(struct gendisk *disk, fmode_t mode)
1535 */ 1535 */
1536 err = loop_clr_fd(lo); 1536 err = loop_clr_fd(lo);
1537 if (!err) 1537 if (!err)
1538 goto out_unlocked; 1538 return;
1539 } else { 1539 } else {
1540 /* 1540 /*
1541 * Otherwise keep thread (if running) and config, 1541 * Otherwise keep thread (if running) and config,
@@ -1546,8 +1546,6 @@ static int lo_release(struct gendisk *disk, fmode_t mode)
1546 1546
1547out: 1547out:
1548 mutex_unlock(&lo->lo_ctl_mutex); 1548 mutex_unlock(&lo->lo_ctl_mutex);
1549out_unlocked:
1550 return 0;
1551} 1549}
1552 1550
1553static const struct block_device_operations lo_fops = { 1551static const struct block_device_operations lo_fops = {