summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/devices/blkmtd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/devices/blkmtd.c')
-rw-r--r--drivers/mtd/devices/blkmtd.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/mtd/devices/blkmtd.c b/drivers/mtd/devices/blkmtd.c
index 662e807801ed..59a29e616a22 100644
--- a/drivers/mtd/devices/blkmtd.c
+++ b/drivers/mtd/devices/blkmtd.c
@@ -539,11 +539,8 @@ static void free_device(struct blkmtd_dev *dev)
{
DEBUG(2, "blkmtd: free_device() dev = %p\n", dev);
if(dev) {
- if(dev->mtd_info.eraseregions)
- kfree(dev->mtd_info.eraseregions);
- if(dev->mtd_info.name)
- kfree(dev->mtd_info.name);
-
+ kfree(dev->mtd_info.eraseregions);
+ kfree(dev->mtd_info.name);
if(dev->blkdev) {
invalidate_inode_pages(dev->blkdev->bd_inode->i_mapping);
close_bdev_excl(dev->blkdev);