diff options
author | Yojiro Uo <yuo@cvs.openbsd.org> | 2010-04-16 04:44:27 +0000 |
---|---|---|
committer | Yojiro Uo <yuo@cvs.openbsd.org> | 2010-04-16 04:44:27 +0000 |
commit | 5eb76e263bdf1c8f1403dd5a2fd6c7497480c9f9 (patch) | |
tree | 80f8234a3c39568b9adc288f4a3dfee8cd3b119b /sys/dev/usb | |
parent | f0d9c0baf04a19c47ffd46bacc4501d9779bbf90 (diff) |
fix condition of retry counter.
reported by enami-san
Diffstat (limited to 'sys/dev/usb')
-rw-r--r-- | sys/dev/usb/uthum.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/usb/uthum.c b/sys/dev/usb/uthum.c index e86da17090a..71920aaf2a3 100644 --- a/sys/dev/usb/uthum.c +++ b/sys/dev/usb/uthum.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uthum.c,v 1.11 2010/04/15 16:20:31 deraadt Exp $ */ +/* $OpenBSD: uthum.c,v 1.12 2010/04/16 04:44:26 yuo Exp $ */ /* * Copyright (c) 2009, 2010 Yojiro UO <yuo@nui.org> @@ -401,7 +401,7 @@ uthum_check_device_info(struct uthum_softc *sc) break; } - if (retry < 0) + if (retry <= 0) return EIO; dev_type = betoh16(dinfo.dev_type); @@ -560,7 +560,7 @@ uthum_ntc_tuning(struct uthum_softc *sc, int sensor, int *val) } else break; } - if (retry < 0) + if (retry <= 0) return EIO; } else { curval = *val; |