From: zhong jiang Date: Wed, 8 Aug 2018 15:00:35 +0000 (+0800) Subject: drivers/block/aoe/aoedev: NULL check is not needed for mempool_destroy X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=69daf897d75b31ff90031bb0a49a8d65cedfe3ca;p=openwrt%2Fstaging%2Fblogic.git 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 Signed-off-by: Jens Axboe --- 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);