提交 720bc782 编写于 作者: S Stefan Weil 提交者: Kevin Hilman

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: NStefan Weil <weil@mail.berlios.de>
Acked-by: NShweta Gulati <shweta.gulati@ti.com>
Signed-off-by: NKevin Hilman <khilman@ti.com>
上级 62270119
...@@ -834,7 +834,8 @@ static int __init omap_sr_probe(struct platform_device *pdev) ...@@ -834,7 +834,8 @@ static int __init omap_sr_probe(struct platform_device *pdev)
if (!pdata) { if (!pdata) {
dev_err(&pdev->dev, "%s: platform data missing\n", __func__); dev_err(&pdev->dev, "%s: platform data missing\n", __func__);
return -EINVAL; ret = -EINVAL;
goto err_free_devinfo;
} }
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册