Commit e9a9bb4e authored by Dan Carpenter's avatar Dan Carpenter Committed by Tony Lindgren
Browse files

ARM: OMAP2+: Missing error code in omap_device_build()



We need to set the error code if omap_device_alloc() fails.

Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent b6d6af72
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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)