aboutsummaryrefslogtreecommitdiff
path: root/drivers/mtd/maps/integrator-flash.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/maps/integrator-flash.c')
-rw-r--r--drivers/mtd/maps/integrator-flash.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/mtd/maps/integrator-flash.c b/drivers/mtd/maps/integrator-flash.c
index d14a0185b8f..93f50d6d548 100644
--- a/drivers/mtd/maps/integrator-flash.c
+++ b/drivers/mtd/maps/integrator-flash.c
@@ -148,8 +148,7 @@ static int armflash_probe(struct device *_dev)
del_mtd_partitions(info->mtd);
map_destroy(info->mtd);
}
- if (info->parts)
- kfree(info->parts);
+ kfree(info->parts);
no_device:
iounmap(base);
@@ -176,8 +175,7 @@ static int armflash_remove(struct device *_dev)
del_mtd_partitions(info->mtd);
map_destroy(info->mtd);
}
- if (info->parts)
- kfree(info->parts);
+ kfree(info->parts);
iounmap(info->map.virt);
release_resource(info->res);