mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
1950267e6e
commit
a8ca889ed9
4 changed files with 7 additions and 10 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue