From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: OMAP2+: Missing error code in omap_device_build()
Date: Tue, 28 Nov 2017 06:55:21 -0800 [thread overview]
Message-ID: <20171128145521.GX28152@atomide.com> (raw)
In-Reply-To: <20171114060648.frwveus2pjpx5idw@mwanda>
* 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
prev parent reply other threads:[~2017-11-28 14:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171128145521.GX28152@atomide.com \
--to=tony@atomide.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).