commit | a751d3155dee38cb2a8e46d8cf3fa6998b2f3239 | [log] [tgz] |
---|---|---|
author | Axel Lin <axel.lin@gmail.com> | Thu Jun 30 19:53:09 2011 +0800 |
committer | Artem Bityutskiy <artem.bityutskiy@intel.com> | Sun Sep 11 15:02:14 2011 +0300 |
tree | e06af51f16f00961aed6db0fe68c98908247d87b | |
parent | 201ab536ac205a2787f8eac2eedc697616f99e04 [diff] |
mtd: fsl_upm: fix a memory leak in fun_chip_init error path Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Artem Bityutskiy <dedekind1@gmail.com>
diff --git a/drivers/mtd/nand/fsl_upm.c b/drivers/mtd/nand/fsl_upm.c index da92fed..b4f3cc9 100644 --- a/drivers/mtd/nand/fsl_upm.c +++ b/drivers/mtd/nand/fsl_upm.c
@@ -196,6 +196,8 @@ ret = mtd_device_parse_register(&fun->mtd, NULL, &ppdata, NULL, 0); err: of_node_put(flash_np); + if (ret) + kfree(fun->mtd.name); return ret; }