From: Lukasz Majewski <l.majewski@samsung.com>
To: Eduardo Valentin <edubezval@gmail.com>
Cc: Lukasz Majewski <l.majewski@samsung.com>,
Zhang Rui <rui.zhang@intel.com>,
Linux PM list <linux-pm@vger.kernel.org>,
"linux-samsung-soc@vger.kernel.org"
<linux-samsung-soc@vger.kernel.org>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
Lukasz Majewski <l.majewski@majess.pl>,
Abhilash Kesavan <kesavan.abhilash@gmail.com>,
Abhilash Kesavan <a.kesavan@samsung.com>,
Chanwoo Choi <cw00.choi@samsung.com>
Subject: Re: [PATCH] thermal: exynos: fix: Check if data->tmu_read callback is present before read
Date: Mon, 16 Feb 2015 10:53:59 +0100 [thread overview]
Message-ID: <20150216105359.1b39fac8@amdc2363> (raw)
In-Reply-To: <1423228030-18708-1-git-send-email-l.majewski@samsung.com>
Hi Eduardo,
> The exynos_tmu_data() function should on entrance test not only for
> valid data pointer, but also for data->tmu_read one.
> It is important, since afterwards it is dereferenced to get
> temperature code.
>
> Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
> ---
> drivers/thermal/samsung/exynos_tmu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/thermal/samsung/exynos_tmu.c
> b/drivers/thermal/samsung/exynos_tmu.c index 3a19353..a86e0495e 100644
> --- a/drivers/thermal/samsung/exynos_tmu.c
> +++ b/drivers/thermal/samsung/exynos_tmu.c
> @@ -717,7 +717,7 @@ static int exynos_get_temp(void *p, long *temp)
> {
> struct exynos_tmu_data *data = p;
>
> - if (!data)
> + if (!data || !data->tmu_read)
> return -EINVAL;
>
> mutex_lock(&data->lock);
This fix shall be added to v3.20.
--
Best regards,
Lukasz Majewski
Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
next prev parent reply other threads:[~2015-02-16 9:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-06 13:07 [PATCH] thermal: exynos: fix: Check if data->tmu_read callback is present before read Lukasz Majewski
2015-02-16 9:53 ` Lukasz Majewski [this message]
2015-02-19 12:23 ` Abhilash Kesavan
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=20150216105359.1b39fac8@amdc2363 \
--to=l.majewski@samsung.com \
--cc=a.kesavan@samsung.com \
--cc=b.zolnierkie@samsung.com \
--cc=cw00.choi@samsung.com \
--cc=edubezval@gmail.com \
--cc=kesavan.abhilash@gmail.com \
--cc=l.majewski@majess.pl \
--cc=linux-pm@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=rui.zhang@intel.com \
/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