diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2017-11-14 07:06:48 +0100 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2017-11-28 16:03:26 +0100 |
commit | e9a9bb4e4779ca74cb52a6e2f8acbc0881d3bb18 (patch) | |
tree | 3cee0bbd69201eee19e5bb563f6f91a3455ee1e3 /arch/arm/mach-omap2 | |
parent | ARM: AM33xx: PRM: Remove am33xx_pwrdm_read_prev_pwrst function (diff) | |
download | linux-e9a9bb4e4779ca74cb52a6e2f8acbc0881d3bb18.tar.xz linux-e9a9bb4e4779ca74cb52a6e2f8acbc0881d3bb18.zip |
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) |