mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kishon Vijay Abraham I <kishon@ti.com>
To: <linux-kernel@vger.kernel.org>, "arnd@arndb.de" <arnd@arndb.de>,
	Tony Lindgren <tony@atomide.com>
Cc: <nsekhar@ti.com>
Subject: Re: [PATCH] bus: omap-ocp2scp: Fix error handling in omap_ocp2scp_probe
Date: Tue, 4 Jul 2017 15:52:36 +0530	[thread overview]
Message-ID: <a01cb515-f127-3dde-44de-ebd9e164f7b3@ti.com> (raw)
In-Reply-To: <20170519084631.361-1-kishon@ti.com>

+Tony, Arnd,

Hi,

On Friday 19 May 2017 02:16 PM, Kishon Vijay Abraham I wrote:
> The error handling code in omap_ocp2scp_probe fails to invoke
> pm_runtime_disable and fails to initialize return value in
> certain cases. Fix it here.

Can this patch be picked into arm-soc tree?

Thanks
Kishon
> 
> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
> Signed-off-by: Sekhar Nori <nsekhar@ti.com>
> ---
>  drivers/bus/omap-ocp2scp.c | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/bus/omap-ocp2scp.c b/drivers/bus/omap-ocp2scp.c
> index bf500e0e7362..77791f3dcfc6 100644
> --- a/drivers/bus/omap-ocp2scp.c
> +++ b/drivers/bus/omap-ocp2scp.c
> @@ -70,8 +70,10 @@ static int omap_ocp2scp_probe(struct platform_device *pdev)
>  	if (!of_device_is_compatible(np, "ti,am437x-ocp2scp")) {
>  		res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>  		regs = devm_ioremap_resource(&pdev->dev, res);
> -		if (IS_ERR(regs))
> -			goto err0;
> +		if (IS_ERR(regs)) {
> +			ret = PTR_ERR(regs);
> +			goto err1;
> +		}
>  
>  		pm_runtime_get_sync(&pdev->dev);
>  		reg = readl_relaxed(regs + OCP2SCP_TIMING);
> @@ -83,6 +85,9 @@ static int omap_ocp2scp_probe(struct platform_device *pdev)
>  
>  	return 0;
>  
> +err1:
> +	pm_runtime_disable(&pdev->dev);
> +
>  err0:
>  	device_for_each_child(&pdev->dev, NULL, ocp2scp_remove_devices);
>  
> 

  reply	other threads:[~2017-07-04 10:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-19  8:46 Kishon Vijay Abraham I
2017-07-04 10:22 ` Kishon Vijay Abraham I [this message]
2017-07-05  8:08   ` Tony Lindgren
2017-07-11 10:17     ` Kishon Vijay Abraham I

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=a01cb515-f127-3dde-44de-ebd9e164f7b3@ti.com \
    --to=kishon@ti.com \
    --cc=arnd@arndb.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nsekhar@ti.com \
    --cc=tony@atomide.com \
    /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

all inboxes | Powered by JetHome®