lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 10 Jan 2020 10:30:39 -0800
From:   Dmitry Torokhov <dmitry.torokhov@...il.com>
To:     Chuhong Yuan <hslester96@...il.com>
Cc:     Maxime Ripard <mripard@...nel.org>, Chen-Yu Tsai <wens@...e.org>,
        Hans de Goede <hdegoede@...hat.com>,
        Eduardo Valentin <edubezval@...il.com>,
        linux-input@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Input: sun4i-ts - add a check for
 devm_thermal_zone_of_sensor_register

On Tue, Dec 10, 2019 at 05:14:01PM +0800, Chuhong Yuan wrote:
> The driver misses a check for devm_thermal_zone_of_sensor_register().
> Add a check to fix it.
> 
> Fixes: e28d0c9cd381 ("input: convert sun4i-ts to use devm_thermal_zone_of_sensor_register")
> Signed-off-by: Chuhong Yuan <hslester96@...il.com>

Applied, thank you.

> ---
>  drivers/input/touchscreen/sun4i-ts.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/input/touchscreen/sun4i-ts.c b/drivers/input/touchscreen/sun4i-ts.c
> index 0af0fe8c40d7..742a7e96c1b5 100644
> --- a/drivers/input/touchscreen/sun4i-ts.c
> +++ b/drivers/input/touchscreen/sun4i-ts.c
> @@ -237,6 +237,7 @@ static int sun4i_ts_probe(struct platform_device *pdev)
>  	struct device *dev = &pdev->dev;
>  	struct device_node *np = dev->of_node;
>  	struct device *hwmon;
> +	struct thermal_zone_device *thermal;
>  	int error;
>  	u32 reg;
>  	bool ts_attached;
> @@ -355,7 +356,10 @@ static int sun4i_ts_probe(struct platform_device *pdev)
>  	if (IS_ERR(hwmon))
>  		return PTR_ERR(hwmon);
>  
> -	devm_thermal_zone_of_sensor_register(ts->dev, 0, ts, &sun4i_ts_tz_ops);
> +	thermal = devm_thermal_zone_of_sensor_register(ts->dev, 0, ts,
> +						       &sun4i_ts_tz_ops);
> +	if (IS_ERR(thermal))
> +		return PTR_ERR(thermal);
>  
>  	writel(TEMP_IRQ_EN(1), ts->base + TP_INT_FIFOC);
>  
> -- 
> 2.24.0
> 

-- 
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ