diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2017-11-14 09:06:48 +0300 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2017-11-28 07:03:26 -0800 |
commit | e9a9bb4e4779ca74cb52a6e2f8acbc0881d3bb18 (patch) | |
tree | 3cee0bbd69201eee19e5bb563f6f91a3455ee1e3 /arch/arm/mach-omap2 | |
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')
-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, 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) |