From: Eduardo Valentin <eduardo.valentin@ti.com>
To: Sachin Kamat <sachin.kamat@linaro.org>
Cc: linux-pm@vger.kernel.org, jonghwa3.lee@samsung.com,
eduardo.valentin@ti.com, rui.zhang@intel.com,
amit.daniel@samsung.com, patches@linaro.org
Subject: Re: [PATCH 2/3] thermal: exynos: Fix potential NULL pointer dereference
Date: Thu, 29 Aug 2013 08:17:21 -0400 [thread overview]
Message-ID: <521F3BD1.1010803@ti.com> (raw)
In-Reply-To: <1376893723-22138-2-git-send-email-sachin.kamat@linaro.org>
[-- Attachment #1: Type: text/plain, Size: 1710 bytes --]
On 19-08-2013 02:28, Sachin Kamat wrote:
> NULL pointer was being dereferenced in its own error message.
> Changed it to the correct device pointer.
>
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Eduardo Valentin <eduardo.valentin@ti.com>
> ---
> drivers/thermal/samsung/exynos_thermal_common.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/thermal/samsung/exynos_thermal_common.c b/drivers/thermal/samsung/exynos_thermal_common.c
> index 4d8e444..f10a6ad 100644
> --- a/drivers/thermal/samsung/exynos_thermal_common.c
> +++ b/drivers/thermal/samsung/exynos_thermal_common.c
> @@ -53,7 +53,7 @@ static int exynos_set_mode(struct thermal_zone_device *thermal,
> {
> struct exynos_thermal_zone *th_zone = thermal->devdata;
> if (!th_zone) {
> - dev_err(th_zone->sensor_conf->dev,
> + dev_err(&thermal->device,
> "thermal zone not registered\n");
> return 0;
> }
> @@ -231,7 +231,7 @@ static int exynos_get_temp(struct thermal_zone_device *thermal,
> void *data;
>
> if (!th_zone->sensor_conf) {
> - dev_err(th_zone->sensor_conf->dev,
> + dev_err(&thermal->device,
> "Temperature sensor not initialised\n");
> return -EINVAL;
> }
> @@ -251,7 +251,7 @@ static int exynos_set_emul_temp(struct thermal_zone_device *thermal,
> struct exynos_thermal_zone *th_zone = thermal->devdata;
>
> if (!th_zone->sensor_conf) {
> - dev_err(th_zone->sensor_conf->dev,
> + dev_err(&thermal->device,
> "Temperature sensor not initialised\n");
> return -EINVAL;
> }
>
--
You have got to be excited about what you are doing. (L. Lamport)
Eduardo Valentin
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 295 bytes --]
next prev parent reply other threads:[~2013-08-29 12:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-19 6:28 [PATCH 1/3] thermal: exynos: Fix typos in Kconfig Sachin Kamat
2013-08-19 6:28 ` [PATCH 2/3] thermal: exynos: Fix potential NULL pointer dereference Sachin Kamat
2013-08-29 12:17 ` Eduardo Valentin [this message]
2013-08-19 6:28 ` [PATCH 3/3] thermal: exynos: Clean up non-DT remnants Sachin Kamat
2013-08-29 12:17 ` Eduardo Valentin
2013-08-26 14:15 ` [PATCH 1/3] thermal: exynos: Fix typos in Kconfig Sachin Kamat
2013-08-28 9:01 ` amit daniel kachhap
2013-08-29 12:17 ` Eduardo Valentin
2013-08-30 8:35 ` Zhang Rui
2013-08-30 12:36 ` Eduardo Valentin
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=521F3BD1.1010803@ti.com \
--to=eduardo.valentin@ti.com \
--cc=amit.daniel@samsung.com \
--cc=jonghwa3.lee@samsung.com \
--cc=linux-pm@vger.kernel.org \
--cc=patches@linaro.org \
--cc=rui.zhang@intel.com \
--cc=sachin.kamat@linaro.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 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).