* [PATCH] ARM: OMAP2+: Missing error code in omap_device_build()
@ 2017-11-14 6:06 Dan Carpenter
2017-11-28 14:55 ` Tony Lindgren
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2017-11-14 6:06 UTC (permalink / raw)
To: linux-arm-kernel
We need to set the error code if omap_device_alloc() fails.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c
index 184acd95c216..f0388058b7da 100644
--- a/arch/arm/mach-omap2/omap_device.c
+++ b/arch/arm/mach-omap2/omap_device.c
@@ -514,8 +514,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)
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] ARM: OMAP2+: Missing error code in omap_device_build()
2017-11-14 6:06 [PATCH] ARM: OMAP2+: Missing error code in omap_device_build() Dan Carpenter
@ 2017-11-28 14:55 ` Tony Lindgren
0 siblings, 0 replies; 2+ messages in thread
From: Tony Lindgren @ 2017-11-28 14:55 UTC (permalink / raw)
To: linux-arm-kernel
* Dan Carpenter <dan.carpenter@oracle.com> [171113 22:10]:
> We need to set the error code if omap_device_alloc() fails.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c
> index 184acd95c216..f0388058b7da 100644
> --- a/arch/arm/mach-omap2/omap_device.c
> +++ b/arch/arm/mach-omap2/omap_device.c
> @@ -514,8 +514,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)
Applying into omap-for-v4.15/fixes thanks.
Tony
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-11-28 14:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-14 6:06 [PATCH] ARM: OMAP2+: Missing error code in omap_device_build() Dan Carpenter
2017-11-28 14:55 ` Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).