]> Git Repo - linux.git/commitdiff
ARM: OMAP2+: Missing error code in omap_device_build()
authorDan Carpenter <[email protected]>
Tue, 14 Nov 2017 06:06:48 +0000 (09:06 +0300)
committerTony Lindgren <[email protected]>
Tue, 28 Nov 2017 15:03:26 +0000 (07:03 -0800)
We need to set the error code if omap_device_alloc() fails.

Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Tony Lindgren <[email protected]>
arch/arm/mach-omap2/omap_device.c

index d45cbfdb4be6838b7f698886a84f4ceb48fe35f8..2e91eb8ab33c1c85b1cb4e22a92910a3cabf5901 100644 (file)
@@ -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)
This page took 0.059184 seconds and 4 git commands to generate.