Commit e9a9bb4e authored by Dan Carpenter's avatar Dan Carpenter Committed by 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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment