diff options
Diffstat (limited to 'drivers/mtd/devices/phram.c')
-rw-r--r-- | drivers/mtd/devices/phram.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/mtd/devices/phram.c b/drivers/mtd/devices/phram.c index e8685ee6c1e4..e09e416667d3 100644 --- a/drivers/mtd/devices/phram.c +++ b/drivers/mtd/devices/phram.c | |||
@@ -1,8 +1,8 @@ | |||
1 | /** | 1 | /** |
2 | * $Id: phram.c,v 1.16 2005/11/07 11:14:25 gleixner Exp $ | 2 | * $Id: phram.c,v 1.16 2005/11/07 11:14:25 gleixner Exp $ |
3 | * | 3 | * |
4 | * Copyright (c) ???? Jochen Schäuble <psionic@psionic.de> | 4 | * Copyright (c) ???? Jochen Schäuble <psionic@psionic.de> |
5 | * Copyright (c) 2003-2004 Jörn Engel <joern@wh.fh-wedel.de> | 5 | * Copyright (c) 2003-2004 Jörn Engel <joern@wh.fh-wedel.de> |
6 | * | 6 | * |
7 | * Usage: | 7 | * Usage: |
8 | * | 8 | * |
@@ -142,7 +142,7 @@ static int register_device(char *name, unsigned long start, unsigned long len) | |||
142 | 142 | ||
143 | new->mtd.name = name; | 143 | new->mtd.name = name; |
144 | new->mtd.size = len; | 144 | new->mtd.size = len; |
145 | new->mtd.flags = MTD_CAP_RAM | MTD_ERASEABLE | MTD_VOLATILE; | 145 | new->mtd.flags = MTD_CAP_RAM; |
146 | new->mtd.erase = phram_erase; | 146 | new->mtd.erase = phram_erase; |
147 | new->mtd.point = phram_point; | 147 | new->mtd.point = phram_point; |
148 | new->mtd.unpoint = phram_unpoint; | 148 | new->mtd.unpoint = phram_unpoint; |
@@ -266,12 +266,16 @@ static int phram_setup(const char *val, struct kernel_param *kp) | |||
266 | return 0; | 266 | return 0; |
267 | 267 | ||
268 | ret = parse_num32(&start, token[1]); | 268 | ret = parse_num32(&start, token[1]); |
269 | if (ret) | 269 | if (ret) { |
270 | kfree(name); | ||
270 | parse_err("illegal start address\n"); | 271 | parse_err("illegal start address\n"); |
272 | } | ||
271 | 273 | ||
272 | ret = parse_num32(&len, token[2]); | 274 | ret = parse_num32(&len, token[2]); |
273 | if (ret) | 275 | if (ret) { |
276 | kfree(name); | ||
274 | parse_err("illegal device length\n"); | 277 | parse_err("illegal device length\n"); |
278 | } | ||
275 | 279 | ||
276 | register_device(name, start, len); | 280 | register_device(name, start, len); |
277 | 281 | ||
@@ -296,5 +300,5 @@ module_init(init_phram); | |||
296 | module_exit(cleanup_phram); | 300 | module_exit(cleanup_phram); |
297 | 301 | ||
298 | MODULE_LICENSE("GPL"); | 302 | MODULE_LICENSE("GPL"); |
299 | MODULE_AUTHOR("Jörn Engel <joern@wh.fh-wedel.de>"); | 303 | MODULE_AUTHOR("Jörn Engel <joern@wh.fh-wedel.de>"); |
300 | MODULE_DESCRIPTION("MTD driver for physical RAM"); | 304 | MODULE_DESCRIPTION("MTD driver for physical RAM"); |