Skip to content

Commit

Permalink
regulator: tps65910: Fix a memory leak in tps65910_probe error path
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Axel Lin authored and Liam Girdwood committed Jul 22, 2011
1 parent af8b244 commit a3ee13e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/regulator/tps65910-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit a3ee13e

Please sign in to comment.