All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Chuhong Yuan <hslester96@gmail.com>
Cc: Maxime Ripard <mripard@kernel.org>, Chen-Yu Tsai <wens@csie.org>,
	Hans de Goede <hdegoede@redhat.com>,
	Eduardo Valentin <edubezval@gmail.com>,
	linux-input@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Input: sun4i-ts - add a check for devm_thermal_zone_of_sensor_register
Date: Fri, 10 Jan 2020 10:30:39 -0800	[thread overview]
Message-ID: <20200110183039.GU8314@dtor-ws> (raw)
In-Reply-To: <20191210091401.23388-1-hslester96@gmail.com>

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@gmail.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

WARNING: multiple messages have this Message-ID (diff)
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Chuhong Yuan <hslester96@gmail.com>
Cc: linux-kernel@vger.kernel.org, Maxime Ripard <mripard@kernel.org>,
	Eduardo Valentin <edubezval@gmail.com>,
	Hans de Goede <hdegoede@redhat.com>, Chen-Yu Tsai <wens@csie.org>,
	linux-input@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] Input: sun4i-ts - add a check for devm_thermal_zone_of_sensor_register
Date: Fri, 10 Jan 2020 10:30:39 -0800	[thread overview]
Message-ID: <20200110183039.GU8314@dtor-ws> (raw)
In-Reply-To: <20191210091401.23388-1-hslester96@gmail.com>

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@gmail.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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-01-10 18:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-10  9:14 [PATCH] Input: sun4i-ts - add a check for devm_thermal_zone_of_sensor_register Chuhong Yuan
2019-12-10  9:14 ` Chuhong Yuan
2020-01-10 18:30 ` Dmitry Torokhov [this message]
2020-01-10 18:30   ` Dmitry Torokhov

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=20200110183039.GU8314@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=edubezval@gmail.com \
    --cc=hdegoede@redhat.com \
    --cc=hslester96@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mripard@kernel.org \
    --cc=wens@csie.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.