From: Zhang Rui <rui.zhang@intel.com>
To: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Cc: Eduardo Valentin <eduardo.valentin@ti.com>,
Grant Likely <grant.likely@linaro.org>,
Rob Herring <robh+dt@kernel.org>,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org
Subject: Re: [PATCH] thermal: ti-soc-thermal: ti-bandgap.c: Cleaning up wrong address is checked
Date: Tue, 01 Jul 2014 09:54:24 +0800 [thread overview]
Message-ID: <1404179664.8366.8.camel@rzhang1-toshiba> (raw)
In-Reply-To: <1401744330-25966-1-git-send-email-rickard_strandqvist@spectrumdigital.se>
On Mon, 2014-06-02 at 23:25 +0200, Rickard Strandqvist wrote:
> Wrong address is checked after memory allocation.
>
> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
applied, thanks.
-rui
> ---
> drivers/thermal/ti-soc-thermal/ti-bandgap.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/thermal/ti-soc-thermal/ti-bandgap.c b/drivers/thermal/ti-soc-thermal/ti-bandgap.c
> index 3ab12ee..43c0f83 100644
> --- a/drivers/thermal/ti-soc-thermal/ti-bandgap.c
> +++ b/drivers/thermal/ti-soc-thermal/ti-bandgap.c
> @@ -1155,7 +1155,7 @@ static struct ti_bandgap *ti_bandgap_build(struct platform_device *pdev)
> /* register shadow for context save and restore */
> bgp->regval = devm_kzalloc(&pdev->dev, sizeof(*bgp->regval) *
> bgp->conf->sensor_count, GFP_KERNEL);
> - if (!bgp) {
> + if (!bgp->regval) {
> dev_err(&pdev->dev, "Unable to allocate mem for driver ref\n");
> return ERR_PTR(-ENOMEM);
> }
prev parent reply other threads:[~2014-07-01 1:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-02 21:25 [PATCH] thermal: ti-soc-thermal: ti-bandgap.c: Cleaning up wrong address is checked Rickard Strandqvist
2014-07-01 1:54 ` Zhang Rui [this message]
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=1404179664.8366.8.camel@rzhang1-toshiba \
--to=rui.zhang@intel.com \
--cc=devicetree@vger.kernel.org \
--cc=eduardo.valentin@ti.com \
--cc=grant.likely@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rickard_strandqvist@spectrumdigital.se \
--cc=robh+dt@kernel.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).