diff options
Diffstat (limited to 'drivers/mtd/maps/tqm8xxl.c')
-rw-r--r-- | drivers/mtd/maps/tqm8xxl.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/mtd/maps/tqm8xxl.c b/drivers/mtd/maps/tqm8xxl.c index 4e28b977f224..0aca8179f27f 100644 --- a/drivers/mtd/maps/tqm8xxl.c +++ b/drivers/mtd/maps/tqm8xxl.c | |||
@@ -224,10 +224,8 @@ int __init init_tqm_mtd(void) | |||
224 | error_mem: | 224 | error_mem: |
225 | for(idx = 0 ; idx < FLASH_BANK_MAX ; idx++) { | 225 | for(idx = 0 ; idx < FLASH_BANK_MAX ; idx++) { |
226 | if(map_banks[idx] != NULL) { | 226 | if(map_banks[idx] != NULL) { |
227 | if(map_banks[idx]->name != NULL) { | 227 | kfree(map_banks[idx]->name); |
228 | kfree(map_banks[idx]->name); | 228 | map_banks[idx]->name = NULL; |
229 | map_banks[idx]->name = NULL; | ||
230 | } | ||
231 | kfree(map_banks[idx]); | 229 | kfree(map_banks[idx]); |
232 | map_banks[idx] = NULL; | 230 | map_banks[idx] = NULL; |
233 | } | 231 | } |