diff options
author | Stefan Weil <weil@mail.berlios.de> | 2011-01-30 14:26:27 -0500 |
---|---|---|
committer | Kevin Hilman <khilman@ti.com> | 2011-01-31 15:59:15 -0500 |
commit | 720bc782249015a30438516cee5c4be180a3f675 (patch) | |
tree | 2cd247c2da8924edd6e192ea4223825b6fa0d225 /arch/arm/mach-omap2/smartreflex.c | |
parent | 62270119867131d6d11fe018f1fafcf0fa2933e3 (diff) |
OMAP: PM: SmartReflex: Fix possible memory leak
sr_info was allocated and needs a kfree before returning.
This error was reported by cppcheck:
arch/arm/mach-omap2/smartreflex.c:837: error: Memory leak: sr_info
To: Tony Lindgren <tony@atomide.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: linux-omap@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Acked-by: Shweta Gulati <shweta.gulati@ti.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/smartreflex.c')
-rw-r--r-- | arch/arm/mach-omap2/smartreflex.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c index d7deadfaddbc..5f429b96fc93 100644 --- a/arch/arm/mach-omap2/smartreflex.c +++ b/arch/arm/mach-omap2/smartreflex.c | |||
@@ -834,7 +834,8 @@ static int __init omap_sr_probe(struct platform_device *pdev) | |||
834 | 834 | ||
835 | if (!pdata) { | 835 | if (!pdata) { |
836 | dev_err(&pdev->dev, "%s: platform data missing\n", __func__); | 836 | dev_err(&pdev->dev, "%s: platform data missing\n", __func__); |
837 | return -EINVAL; | 837 | ret = -EINVAL; |
838 | goto err_free_devinfo; | ||
838 | } | 839 | } |
839 | 840 | ||
840 | mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 841 | mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); |