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>
This commit is contained in:
committed by
Artem Bityutskiy
parent
201ab536ac
commit
a751d3155d
@@ -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);
|
ret = mtd_device_parse_register(&fun->mtd, NULL, &ppdata, NULL, 0);
|
||||||
err:
|
err:
|
||||||
of_node_put(flash_np);
|
of_node_put(flash_np);
|
||||||
|
if (ret)
|
||||||
|
kfree(fun->mtd.name);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user