aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/devices/phram.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/devices/phram.c')
-rw-r--r--drivers/mtd/devices/phram.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mtd/devices/phram.c b/drivers/mtd/devices/phram.c
index 52393282eaf..8d28fa02a5a 100644
--- a/drivers/mtd/devices/phram.c
+++ b/drivers/mtd/devices/phram.c
@@ -117,6 +117,7 @@ static void unregister_devices(void)
117 list_for_each_entry_safe(this, safe, &phram_list, list) { 117 list_for_each_entry_safe(this, safe, &phram_list, list) {
118 del_mtd_device(&this->mtd); 118 del_mtd_device(&this->mtd);
119 iounmap(this->mtd.priv); 119 iounmap(this->mtd.priv);
120 kfree(this->mtd.name);
120 kfree(this); 121 kfree(this);
121 } 122 }
122} 123}
@@ -275,6 +276,8 @@ static int phram_setup(const char *val, struct kernel_param *kp)
275 ret = register_device(name, start, len); 276 ret = register_device(name, start, len);
276 if (!ret) 277 if (!ret)
277 pr_info("%s device: %#x at %#x\n", name, len, start); 278 pr_info("%s device: %#x at %#x\n", name, len, start);
279 else
280 kfree(name);
278 281
279 return ret; 282 return ret;
280} 283}