mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 15:18:19 +00:00
regulator: tps65910: Fix a memory leak in tps65910_probe error path
Fix a memory leak if chip id is not matched. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
This commit is contained in:
parent
af8b244f73
commit
a3ee13ee77
1 changed files with 1 additions and 0 deletions
|
@ -903,6 +903,7 @@ static __devinit int tps65910_probe(struct platform_device *pdev)
|
||||||
info = tps65911_regs;
|
info = tps65911_regs;
|
||||||
default:
|
default:
|
||||||
pr_err("Invalid tps chip version\n");
|
pr_err("Invalid tps chip version\n");
|
||||||
|
kfree(pmic);
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue