diff options
| author | Axel Lin <axel.lin@gmail.com> | 2011-07-10 06:52:07 -0400 |
|---|---|---|
| committer | Liam Girdwood <lrg@slimlogic.co.uk> | 2011-07-22 06:37:15 -0400 |
| commit | a3ee13ee77feea001597415f3a231a8bd4d3c6bf (patch) | |
| tree | d61166fa048e5e354c605c55ca944c9e13de46cb /drivers | |
| parent | af8b244f733383656c8b4c0c6e94e210e7bbc596 (diff) | |
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>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/regulator/tps65910-regulator.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/regulator/tps65910-regulator.c b/drivers/regulator/tps65910-regulator.c index 55dd4e6650db..b07a66471fb7 100644 --- a/drivers/regulator/tps65910-regulator.c +++ b/drivers/regulator/tps65910-regulator.c | |||
| @@ -903,6 +903,7 @@ static __devinit int tps65910_probe(struct platform_device *pdev) | |||
| 903 | info = tps65911_regs; | 903 | info = tps65911_regs; |
| 904 | default: | 904 | default: |
| 905 | pr_err("Invalid tps chip version\n"); | 905 | pr_err("Invalid tps chip version\n"); |
| 906 | kfree(pmic); | ||
| 906 | return -ENODEV; | 907 | return -ENODEV; |
| 907 | } | 908 | } |
| 908 | 909 | ||
