提交 c762b293 编写于 作者: U Uwe Kleine-König 提交者: Sascha Hauer

ARM: mxc: free dma_mask in error path

This fixes a small memory leak that was only hit in very unlikely error
paths
Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de>
上级 84082d66
......@@ -81,6 +81,8 @@ struct platform_device *__init imx_add_platform_device_dmamask(
ret = platform_device_add(pdev);
if (ret) {
err:
if (dmamask)
kfree(pdev->dev.dma_mask);
platform_device_put(pdev);
return ERR_PTR(ret);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册