Re: [PATCH 2/2] thermal: db8500_cpufreq_cooling: remove usage of IS_ERR_OR_NULL()

2013-04-26 Thread Russell King
On Fri, Apr 26, 2013 at 12:19:08PM +0200, Fabio Baltieri wrote: > On Thu, Apr 25, 2013 at 06:46:35PM +0100, Russell King wrote: > > On Thu, Apr 25, 2013 at 10:13:34AM -0400, Eduardo Valentin wrote: > > > diff --git a/drivers/thermal/db8500_cpufreq_cooling.c > > >

Re: [PATCH 2/2] thermal: db8500_cpufreq_cooling: remove usage of IS_ERR_OR_NULL()

2013-04-26 Thread Fabio Baltieri
On Thu, Apr 25, 2013 at 06:46:35PM +0100, Russell King wrote: > On Thu, Apr 25, 2013 at 10:13:34AM -0400, Eduardo Valentin wrote: > > diff --git a/drivers/thermal/db8500_cpufreq_cooling.c > > b/drivers/thermal/db8500_cpufreq_cooling.c > > index 21419851..786d192 100644 > > ---

Re: [PATCH 2/2] thermal: db8500_cpufreq_cooling: remove usage of IS_ERR_OR_NULL()

2013-04-26 Thread Fabio Baltieri
On Thu, Apr 25, 2013 at 06:46:35PM +0100, Russell King wrote: On Thu, Apr 25, 2013 at 10:13:34AM -0400, Eduardo Valentin wrote: diff --git a/drivers/thermal/db8500_cpufreq_cooling.c b/drivers/thermal/db8500_cpufreq_cooling.c index 21419851..786d192 100644 ---

Re: [PATCH 2/2] thermal: db8500_cpufreq_cooling: remove usage of IS_ERR_OR_NULL()

2013-04-26 Thread Russell King
On Fri, Apr 26, 2013 at 12:19:08PM +0200, Fabio Baltieri wrote: On Thu, Apr 25, 2013 at 06:46:35PM +0100, Russell King wrote: On Thu, Apr 25, 2013 at 10:13:34AM -0400, Eduardo Valentin wrote: diff --git a/drivers/thermal/db8500_cpufreq_cooling.c b/drivers/thermal/db8500_cpufreq_cooling.c

Re: [PATCH 2/2] thermal: db8500_cpufreq_cooling: remove usage of IS_ERR_OR_NULL()

2013-04-25 Thread Eduardo Valentin
On 25-04-2013 13:46, Russell King wrote: On Thu, Apr 25, 2013 at 10:13:34AM -0400, Eduardo Valentin wrote: diff --git a/drivers/thermal/db8500_cpufreq_cooling.c b/drivers/thermal/db8500_cpufreq_cooling.c index 21419851..786d192 100644 --- a/drivers/thermal/db8500_cpufreq_cooling.c +++

Re: [PATCH 2/2] thermal: db8500_cpufreq_cooling: remove usage of IS_ERR_OR_NULL()

2013-04-25 Thread Russell King
On Thu, Apr 25, 2013 at 10:13:34AM -0400, Eduardo Valentin wrote: > diff --git a/drivers/thermal/db8500_cpufreq_cooling.c > b/drivers/thermal/db8500_cpufreq_cooling.c > index 21419851..786d192 100644 > --- a/drivers/thermal/db8500_cpufreq_cooling.c > +++ b/drivers/thermal/db8500_cpufreq_cooling.c

[PATCH 2/2] thermal: db8500_cpufreq_cooling: remove usage of IS_ERR_OR_NULL()

2013-04-25 Thread Eduardo Valentin
This patch changes the driver to avoid the usage of IS_ERR_OR_NULL() macro. This macro can lead to dangerous results, like returning success (0) during a failure scenario (NULL pointer handling). The case present in this driver can be translated to a simple check for IS_ERR(), as the

[PATCH 2/2] thermal: db8500_cpufreq_cooling: remove usage of IS_ERR_OR_NULL()

2013-04-25 Thread Eduardo Valentin
This patch changes the driver to avoid the usage of IS_ERR_OR_NULL() macro. This macro can lead to dangerous results, like returning success (0) during a failure scenario (NULL pointer handling). The case present in this driver can be translated to a simple check for IS_ERR(), as the

Re: [PATCH 2/2] thermal: db8500_cpufreq_cooling: remove usage of IS_ERR_OR_NULL()

2013-04-25 Thread Russell King
On Thu, Apr 25, 2013 at 10:13:34AM -0400, Eduardo Valentin wrote: diff --git a/drivers/thermal/db8500_cpufreq_cooling.c b/drivers/thermal/db8500_cpufreq_cooling.c index 21419851..786d192 100644 --- a/drivers/thermal/db8500_cpufreq_cooling.c +++ b/drivers/thermal/db8500_cpufreq_cooling.c @@

Re: [PATCH 2/2] thermal: db8500_cpufreq_cooling: remove usage of IS_ERR_OR_NULL()

2013-04-25 Thread Eduardo Valentin
On 25-04-2013 13:46, Russell King wrote: On Thu, Apr 25, 2013 at 10:13:34AM -0400, Eduardo Valentin wrote: diff --git a/drivers/thermal/db8500_cpufreq_cooling.c b/drivers/thermal/db8500_cpufreq_cooling.c index 21419851..786d192 100644 --- a/drivers/thermal/db8500_cpufreq_cooling.c +++