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>
This commit is contained in:
zhong jiang 2018-08-08 23:00:35 +08:00 committed by Jens Axboe
parent d5fcc4e46e
commit 69daf897d7
1 changed files with 2 additions and 2 deletions

View File

@ -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);