diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-05-05 21:31:22 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-05-05 21:31:22 -0400 |
commit | a8ca889ed9585894d53fd8919d80cbe8baff09e7 (patch) | |
tree | 72461b2648110bf57d28d1949d1b5fe76a2148c1 /drivers/mtd/mtd_blkdevs.c | |
parent | 1950267e6e9dc2531f2790bf217aa7aadc9aa324 (diff) | |
download | linux-stable-a8ca889ed9585894d53fd8919d80cbe8baff09e7.tar.gz linux-stable-a8ca889ed9585894d53fd8919d80cbe8baff09e7.tar.bz2 linux-stable-a8ca889ed9585894d53fd8919d80cbe8baff09e7.zip |
mtd_blktrans_ops->release() should return void
Both existing instances always return 0 and even if they didn't,
the value would be lost on the way out. Just don't bother...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/mtd/mtd_blkdevs.c')
-rw-r--r-- | drivers/mtd/mtd_blkdevs.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mtd/mtd_blkdevs.c b/drivers/mtd/mtd_blkdevs.c index 5ad39bb5ab4c..65d7e7e2fb1f 100644 --- a/drivers/mtd/mtd_blkdevs.c +++ b/drivers/mtd/mtd_blkdevs.c @@ -240,10 +240,9 @@ error_put: static int blktrans_release(struct gendisk *disk, fmode_t mode) { struct mtd_blktrans_dev *dev = blktrans_dev_get(disk); - int ret = 0; if (!dev) - return ret; + return 0; mutex_lock(&dev->lock); @@ -254,13 +253,14 @@ static int blktrans_release(struct gendisk *disk, fmode_t mode) module_put(dev->tr->owner); if (dev->mtd) { - ret = dev->tr->release ? dev->tr->release(dev) : 0; + if (dev->tr->release) + dev->tr->release(dev); __put_mtd_device(dev->mtd); } unlock: mutex_unlock(&dev->lock); blktrans_dev_put(dev); - return ret; + return 0; } static int blktrans_getgeo(struct block_device *bdev, struct hd_geometry *geo) |