提交 e9a9bb4e 编写于 作者: D Dan Carpenter 提交者: Tony Lindgren

ARM: OMAP2+: Missing error code in omap_device_build()

We need to set the error code if omap_device_alloc() fails.
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NTony Lindgren <tony@atomide.com>
上级 b6d6af72
...@@ -516,8 +516,10 @@ struct platform_device __init *omap_device_build(const char *pdev_name, ...@@ -516,8 +516,10 @@ struct platform_device __init *omap_device_build(const char *pdev_name,
goto odbs_exit1; goto odbs_exit1;
od = omap_device_alloc(pdev, &oh, 1); od = omap_device_alloc(pdev, &oh, 1);
if (IS_ERR(od)) if (IS_ERR(od)) {
ret = PTR_ERR(od);
goto odbs_exit1; goto odbs_exit1;
}
ret = platform_device_add_data(pdev, pdata, pdata_len); ret = platform_device_add_data(pdev, pdata, pdata_len);
if (ret) if (ret)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册