public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: l.majewski@samsung.com (Lukasz Majewski)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/5] thermal: exynos: Use IS_ERR() because regulator cannot be NULL
Date: Wed, 04 Nov 2015 12:17:54 +0100	[thread overview]
Message-ID: <20151104121754.70c5f148@amdc2363> (raw)
In-Reply-To: <CAGOxZ5398_iCw3qVpwmE5Cub09+M=g45psKOhPZo=zPv4L4fOA@mail.gmail.com>

Hi Alim,

> Hello,
> 
> On Thu, Oct 8, 2015 at 11:04 AM, Krzysztof Kozlowski
> <k.kozlowski@samsung.com> wrote:
> > The NULL check in probe's error path is not needed because in that
> > time the regulator cannot be NULL (regulator_get() returns valid
> > pointer or ERR_PTR).
> >
> > Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> > ---
> Reviewed-by: Alim Akhtar <alim.akhtar@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
> > bc71a61f0c4a..eac6aebf82f3 100644 ---
> > a/drivers/thermal/samsung/exynos_tmu.c +++
> > b/drivers/thermal/samsung/exynos_tmu.c @@ -1396,7 +1396,7 @@
> > err_clk_sec: if (!IS_ERR(data->clk_sec))
> >                 clk_unprepare(data->clk_sec);
> >  err_sensor:
> > -       if (!IS_ERR_OR_NULL(data->regulator))
> > +       if (!IS_ERR(data->regulator))
> >                 regulator_disable(data->regulator);
> >
> >         return ret;
> > --
> > 1.9.1
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe
> > linux-samsung-soc" in the body of a message to
> > majordomo at vger.kernel.org More majordomo info at
> > http://vger.kernel.org/majordomo-info.html
> 
> 
> 

Acked-by: Lukasz Majewski <l.majewski@samsung.com>
Tested-by: Lukasz Majewski <l.majewski@samsung.com>

-- 
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group

  reply	other threads:[~2015-11-04 11:17 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-08  5:34 [PATCH 1/5] thermal: exynos: Fix unbalanced regulator disable on probe failure Krzysztof Kozlowski
2015-10-08  5:34 ` [PATCH 2/5] thermal: exynos: Fix first temperature read after registering sensor Krzysztof Kozlowski
2015-10-08 16:43   ` Alim Akhtar
2015-11-04 11:18     ` Lukasz Majewski
2015-10-08  5:34 ` [PATCH 3/5] thermal: exynos: Use IS_ERR() because regulator cannot be NULL Krzysztof Kozlowski
2015-10-08 16:46   ` Alim Akhtar
2015-11-04 11:17     ` Lukasz Majewski [this message]
2015-10-08  5:34 ` [PATCH 4/5] thermal: exynos: Remove unneeded semicolon Krzysztof Kozlowski
2015-11-04 10:52   ` Lukasz Majewski
2015-10-08  5:34 ` [PATCH 5/5] thermal: exynos: Directly return 0 instead of using local ret variable Krzysztof Kozlowski
2015-10-08 16:47   ` Alim Akhtar
2015-11-04 10:51     ` Lukasz Majewski
2015-10-08 16:45 ` [PATCH 1/5] thermal: exynos: Fix unbalanced regulator disable on probe failure Alim Akhtar
2015-10-09 10:58   ` Krzysztof Kozlowski
2015-10-10  1:46     ` Alim Akhtar
2015-11-04 10:52       ` Lukasz Majewski

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=20151104121754.70c5f148@amdc2363 \
    --to=l.majewski@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.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