Re: [PATCH] thermal: rcar_thermal: Handle probe error gracefully

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxx>

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




[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux