ARM: OMAP2+: Missing error code in omap_device_build()
We need to set the error code if omap_device_alloc() fails. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
This commit is contained in:
parent
b6d6af7226
commit
e9a9bb4e47
|
@ -516,8 +516,10 @@ struct platform_device __init *omap_device_build(const char *pdev_name,
|
|||
goto odbs_exit1;
|
||||
|
||||
od = omap_device_alloc(pdev, &oh, 1);
|
||||
if (IS_ERR(od))
|
||||
if (IS_ERR(od)) {
|
||||
ret = PTR_ERR(od);
|
||||
goto odbs_exit1;
|
||||
}
|
||||
|
||||
ret = platform_device_add_data(pdev, pdata, pdata_len);
|
||||
if (ret)
|
||||
|
|
Loading…
Reference in New Issue