From: Axel Lin Date: Sun, 10 Jul 2011 10:52:07 +0000 (+0800) Subject: regulator: tps65910: Fix a memory leak in tps65910_probe error path X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=a3ee13ee77feea001597415f3a231a8bd4d3c6bf;p=linux-beck.git 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 Acked-by: Mark Brown Signed-off-by: Liam Girdwood --- 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) info = tps65911_regs; default: pr_err("Invalid tps chip version\n"); + kfree(pmic); return -ENODEV; }