linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: "Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>,
	linux-pm@vger.kernel.org, linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH] thermal: rcar_thermal: Handle probe error gracefully
Date: Thu, 12 Mar 2020 12:21:34 +0100	[thread overview]
Message-ID: <fcc43b2a-c21d-febf-f709-9511cbff0983@linaro.org> (raw)
In-Reply-To: <20200310114709.1483860-1-niklas.soderlund+renesas@ragnatech.se>

On 10/03/2020 12:47, Niklas Söderlund wrote:
> If the common register memory resource is not available the driver needs
> to fail gracefully to disable PM. Instead of returning the error
> directly store it in ret and use the already existing error path.
> 
> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

Applied, thanks

> ---
>  drivers/thermal/rcar_thermal.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c
> index 8f1aafa2044e5ba7..4a48d1d2a31c9250 100644
> --- a/drivers/thermal/rcar_thermal.c
> +++ b/drivers/thermal/rcar_thermal.c
> @@ -521,8 +521,10 @@ static int rcar_thermal_probe(struct platform_device *pdev)
>  			res = platform_get_resource(pdev, IORESOURCE_MEM,
>  						    mres++);
>  			common->base = devm_ioremap_resource(dev, res);
> -			if (IS_ERR(common->base))
> -				return PTR_ERR(common->base);
> +			if (IS_ERR(common->base)) {
> +				ret = PTR_ERR(common->base);
> +				goto error_unregister;
> +			}
>  
>  			idle = 0; /* polling delay is not needed */
>  		}
> 


-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


      parent reply	other threads:[~2020-03-12 11:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-10 11:47 [PATCH] thermal: rcar_thermal: Handle probe error gracefully Niklas Söderlund
2020-03-10 12:42 ` Geert Uytterhoeven
2020-03-12 11:21 ` Daniel Lezcano [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=fcc43b2a-c21d-febf-f709-9511cbff0983@linaro.org \
    --to=daniel.lezcano@linaro.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=niklas.soderlund+renesas@ragnatech.se \
    /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).