diff options
Diffstat (limited to 'drivers/mtd/devices/phram.c')
-rw-r--r-- | drivers/mtd/devices/phram.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/mtd/devices/phram.c b/drivers/mtd/devices/phram.c index 41af9693d880..68d39cc9df71 100644 --- a/drivers/mtd/devices/phram.c +++ b/drivers/mtd/devices/phram.c | |||
@@ -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 | ||