提交 a751d315 编写于 作者: A Axel Lin 提交者: Artem Bityutskiy

mtd: fsl_upm: fix a memory leak in fun_chip_init error path

Signed-off-by: NAxel Lin <axel.lin@gmail.com>
Signed-off-by: NArtem Bityutskiy <dedekind1@gmail.com>
上级 201ab536
......@@ -196,6 +196,8 @@ static int __devinit fun_chip_init(struct fsl_upm_nand *fun,
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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册