Skip to content

Commit

Permalink
ARM: OMAP2+: Missing error code in omap_device_build()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and Tony Lindgren committed Nov 28, 2017
1 parent b6d6af7 commit e9a9bb4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion arch/arm/mach-omap2/omap_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e9a9bb4

Please sign in to comment.