aboutsummaryrefslogtreecommitdiff
path: root/drivers/block
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/aoe/aoedev.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/block/aoe/aoedev.c b/drivers/block/aoe/aoedev.c
index a40a78a7f44..ec16c64dd11 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);
}