mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
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:
parent
d5fcc4e46e
commit
69daf897d7
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user