Commit 294ed6b9 authored by Tian Tao's avatar Tian Tao Committed by Jens Axboe

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: default avatarTian Tao <tiantao6@hisilicon.com>
Acked-by: default avatarMinchan Kim <minchan@kernel.org>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 370276ba
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment