summaryrefslogtreecommitdiffstats
path: root/drivers/block/aoe
diff options
context:
space:
mode:
authorzhong jiang <zhongjiang@huawei.com>2018-08-08 17:00:35 +0200
committerJens Axboe <axboe@kernel.dk>2018-08-08 17:17:20 +0200
commit69daf897d75b31ff90031bb0a49a8d65cedfe3ca (patch)
tree42a7fa10acb54d5ddc01c3005ae870741b736fd6 /drivers/block/aoe
parentdrivers/block/mtip32xx: remove the null check for debugfs_remove_recursive (diff)
downloadlinux-69daf897d75b31ff90031bb0a49a8d65cedfe3ca.tar.xz
linux-69daf897d75b31ff90031bb0a49a8d65cedfe3ca.zip
drivers/block/aoe/aoedev: NULL check is not needed for mempool_destroy
mempool_destroy has taken the null pointer into account. So it is safe to remove the null check. Signed-off-by: zhong jiang <zhongjiang@huawei.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/aoe')
-rw-r--r--drivers/block/aoe/aoedev.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/block/aoe/aoedev.c b/drivers/block/aoe/aoedev.c
index 697f735b07a4..41060e9cedf2 100644
--- a/drivers/block/aoe/aoedev.c
+++ b/drivers/block/aoe/aoedev.c
@@ -284,8 +284,8 @@ freedev(struct aoedev *d)
e = t + d->ntargets;
for (; t < e && *t; t++)
freetgt(d, *t);
- if (d->bufpool)
- mempool_destroy(d->bufpool);
+
+ mempool_destroy(d->bufpool);
skbpoolfree(d);
minor_free(d->sysminor);