diff --git a/drivers/block/aoe/aoedev.c b/drivers/block/aoe/aoedev.c index a40a78a7f44a4ffabebbf45826cdf612cafab470..ec16c64dd114c37b30f2f97bb5e8f895c0a6e9bb 100644 --- a/drivers/block/aoe/aoedev.c +++ b/drivers/block/aoe/aoedev.c @@ -146,7 +146,8 @@ aoedev_freedev(struct aoedev *d) put_disk(d->gd); } kfree(d->frames); - mempool_destroy(d->bufpool); + if (d->bufpool) + mempool_destroy(d->bufpool); kfree(d); }