All of lore.kernel.org
 help / color / mirror / Atom feed
* [lm-sensors] hwmon/f75375s.c: buggy if()
@ 2007-10-17 19:54 ` Adrian Bunk
  0 siblings, 0 replies; 28+ 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


_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

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

end of thread, other threads:[~2007-11-02 10:24 UTC | newest]

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.