Commit a3ee13ee authored by Axel Lin's avatar Axel Lin Committed by Liam Girdwood

regulator: tps65910: Fix a memory leak in tps65910_probe error path

Fix a memory leak if chip id is not matched.
Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
Acked-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
parent af8b244f
......@@ -903,6 +903,7 @@ static __devinit int tps65910_probe(struct platform_device *pdev)
info = tps65911_regs;
default:
pr_err("Invalid tps chip version\n");
kfree(pmic);
return -ENODEV;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment