Skip to content

Commit 69daf89

Browse files
xiongzhongjiangaxboe
authored andcommitted
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>
1 parent d5fcc4e commit 69daf89

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎drivers/block/aoe/aoedev.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,8 +284,8 @@ freedev(struct aoedev *d)
284284
e = t + d->ntargets;
285285
for (; t < e && *t; t++)
286286
freetgt(d, *t);
287-
if (d->bufpool)
288-
mempool_destroy(d->bufpool);
287+
288+
mempool_destroy(d->bufpool);
289289
skbpoolfree(d);
290290
minor_free(d->sysminor);
291291

0 commit comments

Comments
 (0)