aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ichwd/ichwd.c
diff options
context:
space:
mode:
authorAndriy Gapon <avg@FreeBSD.org>2009-03-03 15:50:24 +0000
committerAndriy Gapon <avg@FreeBSD.org>2009-03-03 15:50:24 +0000
commitd38d0090c0a19005eceb643a2d6992bb69c4855e (patch)
tree572096ad38b61590a6212147bbb1f2d0b91b8147 /sys/dev/ichwd/ichwd.c
parent1263305f0cef56f87f24e2c3898039b3568d82ed (diff)
downloadsrc-d38d0090c0a19005eceb643a2d6992bb69c4855e.tar.gz
src-d38d0090c0a19005eceb643a2d6992bb69c4855e.zip
ichwd: correct range check for timeout value
Approved by: jhb (mentor)
Notes
Notes: svn path=/head/; revision=189305
Diffstat (limited to 'sys/dev/ichwd/ichwd.c')
-rw-r--r--sys/dev/ichwd/ichwd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/ichwd/ichwd.c b/sys/dev/ichwd/ichwd.c
index 35f8b5f7cb2a..917a31aa6dde 100644
--- a/sys/dev/ichwd/ichwd.c
+++ b/sys/dev/ichwd/ichwd.c
@@ -220,8 +220,8 @@ ichwd_tmr_set(struct ichwd_softc *sc, unsigned int timeout)
uint16_t tmr_val16 = ichwd_read_tco_2(sc, TCO_TMR2);
tmr_val16 &= 0xfc00;
- if (timeout > 0x0bff)
- timeout = 0x0bff;
+ if (timeout > 0x03ff)
+ timeout = 0x03ff;
tmr_val16 |= timeout;
ichwd_write_tco_2(sc, TCO_TMR2, tmr_val16);
}