Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1334589

Re: [PATCH] PM / OPP: Initialize regulator pointer to an error value

From Viresh Kumar <viresh.kumar@linaro.org>
Newsgroups linux.kernel
Subject Re: [PATCH] PM / OPP: Initialize regulator pointer to an error value
Date 2016-02-15 17:50 +0100
Message-ID <r2uvv-3zL-7@gated-at.bofh.it> (permalink)
References <r2ucb-3qG-61@gated-at.bofh.it> <r2ucb-3qG-59@gated-at.bofh.it> <r2uvv-3zL-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 15-02-16, 16:42, Jon Hunter wrote:
> 
> On 15/02/16 16:26, Viresh Kumar wrote:
> > We are currently required to do two checks for regulator pointer:
> > IS_ERR() and IS_NULL().
> > 
> > And multiple instances are reported, about both of these not being used
> > consistently and so resulting in crashes.
> > 
> > Fix that by initializing regulator pointer with an error value and
> > checking it only against an error.
> > 
> > This makes code consistent and efficient.
> > 
> > Reported-by: Jon Hunter <jonathanh@nvidia.com>
> > Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> 
> Tested-by: Jon Hunter <jonathanh@nvidia.com>

Thanks a lot Jon.

-- 
viresh

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] PM / OPP: Initialize regulator pointer to an error value Viresh Kumar <viresh.kumar@linaro.org> - 2016-02-15 17:30 +0100
  Re: [PATCH] PM / OPP: Initialize regulator pointer to an error value Viresh Kumar <viresh.kumar@linaro.org> - 2016-02-15 17:50 +0100
  Re: [PATCH] PM / OPP: Initialize regulator pointer to an error value Jon Hunter <jonathanh@nvidia.com> - 2016-02-15 17:50 +0100
  Re: [PATCH] PM / OPP: Initialize regulator pointer to an error value Arnd Bergmann <arnd@arndb.de> - 2016-02-15 21:40 +0100
    Re: [PATCH] PM / OPP: Initialize regulator pointer to an error value "Rafael J. Wysocki" <rafael@kernel.org> - 2016-02-15 22:20 +0100
      Re: [PATCH] PM / OPP: Initialize regulator pointer to an error value Viresh Kumar <viresh.kumar@linaro.org> - 2016-02-16 01:50 +0100
        Re: [PATCH] PM / OPP: Initialize regulator pointer to an error value "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-02-16 01:50 +0100
    Re: [PATCH] PM / OPP: Initialize regulator pointer to an error value Viresh Kumar <viresh.kumar@linaro.org> - 2016-02-16 02:10 +0100
      Re: [PATCH] PM / OPP: Initialize regulator pointer to an error value Mark Brown <broonie@kernel.org> - 2016-02-16 03:00 +0100
        Re: [PATCH] PM / OPP: Initialize regulator pointer to an error value Arnd Bergmann <arnd@arndb.de> - 2016-02-16 10:20 +0100
          Re: [PATCH] PM / OPP: Initialize regulator pointer to an error value Mark Brown <broonie@kernel.org> - 2016-02-16 14:20 +0100
            Re: [PATCH] PM / OPP: Initialize regulator pointer to an error value Arnd Bergmann <arnd@arndb.de> - 2016-02-16 16:20 +0100
              Re: [PATCH] PM / OPP: Initialize regulator pointer to an error value Mark Brown <broonie@kernel.org> - 2016-02-16 18:00 +0100

csiph-web