public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* hwmon/f75375s.c: buggy if()
@ 2007-10-17 19:54 Adrian Bunk
  2007-10-17 20:45 ` Riku Voipio
  0 siblings, 1 reply; 12+ messages in thread
From: Adrian Bunk @ 2007-10-17 19:54 UTC (permalink / raw)
  To: Riku Voipio, Mark M. Hoffman; +Cc: lm-sensors, linux-kernel

drivers/hwmon/f75375s.c contains the following code:

<--  snip  -->

...
static ssize_t set_pwm_mode(struct device *dev, struct device_attribute *attr,
                const char *buf, size_t count)
{
...
        if (val != 0 || val != 1 || data->kind == f75373)
                return -EINVAL;
...

<--  snip  -->

I'm not sure what exactly was intended, but it was for sure not intended 
to always return -EINVAL...

Spotted by the Coverity checker.

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2007-10-28 17:37 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-17 19:54 hwmon/f75375s.c: buggy if() Adrian Bunk
2007-10-17 20:45 ` Riku Voipio
2007-10-18 13:37   ` Mark M. Hoffman
2007-10-19 12:37     ` [lm-sensors] " Jean Delvare
2007-10-24 11:50       ` Riku Voipio
2007-10-25  2:25         ` Mark M. Hoffman
2007-10-25 11:48           ` Riku Voipio
2007-10-26  8:36             ` Jean Delvare
2007-10-26 11:14               ` Riku Voipio
2007-10-26 21:15                 ` Jean Delvare
2007-10-28 17:33                 ` Mark M. Hoffman
2007-10-25 11:09         ` Jean Delvare

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox