mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 12:42:02 +00:00
zram: fix NULL check before some freeing functions is not needed
fixed the below warning: /drivers/block/zram/zram_drv.c:534:2-8: WARNING: NULL check before some freeing functions is not needed. Signed-off-by: Tian Tao <tiantao6@hisilicon.com> Acked-by: Minchan Kim <minchan@kernel.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
370276bac8
commit
294ed6b9f0
@ -530,8 +530,7 @@ static ssize_t backing_dev_store(struct device *dev,
|
||||
|
||||
return len;
|
||||
out:
|
||||
if (bitmap)
|
||||
kvfree(bitmap);
|
||||
kvfree(bitmap);
|
||||
|
||||
if (bdev)
|
||||
blkdev_put(bdev, FMODE_READ | FMODE_WRITE | FMODE_EXCL);
|
||||
|
Loading…
Reference in New Issue
Block a user