NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/44796: Test of error in pcf8583.c
>Number: 44796
>Category: kern
>Synopsis: Test of error in pcf8583.c
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Mar 30 12:25:00 +0000 2011
>Originator: Henning Petersen
>Release: NetBSD-current
>Organization:
>Environment:
>Description:
I think there is a error in test of return from pcfrtc_clock_write.
>How-To-Repeat:
>Fix:
diff -u -r1.12 pcf8583.c
--- sys/dev/i2c/pcf8583.c 12 Dec 2009 14:44:10 -0000 1.12
+++ sys/dev/i2c/pcf8583.c 26 Mar 2011 11:28:26 -0000
@@ -290,7 +290,7 @@
clock_secs_to_ymdhms(tv->tv_sec, &dt);
- if ((err = pcfrtc_clock_write(sc, &dt, tv->tv_usec / 10000) == 0))
+ if ((err = pcfrtc_clock_write(sc, &dt, tv->tv_usec / 10000)) != 0)
return err;
return (0);
Home |
Main Index |
Thread Index |
Old Index