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>
This commit is contained in:
@@ -1518,7 +1518,7 @@ out:
|
||||
return err;
|
||||
}
|
||||
|
||||
static int lo_release(struct gendisk *disk, fmode_t mode)
|
||||
static void lo_release(struct gendisk *disk, fmode_t mode)
|
||||
{
|
||||
struct loop_device *lo = disk->private_data;
|
||||
int err;
|
||||
@@ -1535,7 +1535,7 @@ static int lo_release(struct gendisk *disk, fmode_t mode)
|
||||
*/
|
||||
err = loop_clr_fd(lo);
|
||||
if (!err)
|
||||
goto out_unlocked;
|
||||
return;
|
||||
} else {
|
||||
/*
|
||||
* Otherwise keep thread (if running) and config,
|
||||
@@ -1546,8 +1546,6 @@ static int lo_release(struct gendisk *disk, fmode_t mode)
|
||||
|
||||
out:
|
||||
mutex_unlock(&lo->lo_ctl_mutex);
|
||||
out_unlocked:
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct block_device_operations lo_fops = {
|
||||
|
Reference in New Issue
Block a user