diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2017-11-14 01:06:48 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2017-11-28 10:03:26 -0500 |
commit | e9a9bb4e4779ca74cb52a6e2f8acbc0881d3bb18 (patch) | |
tree | 3cee0bbd69201eee19e5bb563f6f91a3455ee1e3 /arch/arm/mach-omap2/omap_device.c | |
parent | b6d6af7226465b6d11eac09d0be2ab78a4a9eb62 (diff) |
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>
Diffstat (limited to 'arch/arm/mach-omap2/omap_device.c')
-rw-r--r-- | arch/arm/mach-omap2/omap_device.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c index d45cbfdb4be6..2e91eb8ab33c 100644 --- a/arch/arm/mach-omap2/omap_device.c +++ b/arch/arm/mach-omap2/omap_device.c | |||
@@ -516,8 +516,10 @@ struct platform_device __init *omap_device_build(const char *pdev_name, | |||
516 | goto odbs_exit1; | 516 | goto odbs_exit1; |
517 | 517 | ||
518 | od = omap_device_alloc(pdev, &oh, 1); | 518 | od = omap_device_alloc(pdev, &oh, 1); |
519 | if (IS_ERR(od)) | 519 | if (IS_ERR(od)) { |
520 | ret = PTR_ERR(od); | ||
520 | goto odbs_exit1; | 521 | goto odbs_exit1; |
522 | } | ||
521 | 523 | ||
522 | ret = platform_device_add_data(pdev, pdata, pdata_len); | 524 | ret = platform_device_add_data(pdev, pdata, pdata_len); |
523 | if (ret) | 525 | if (ret) |