summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea G. Monaco <andrea.monaco@autistici.org>2021-02-03 23:59:47 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2021-02-03 23:59:47 +0100
commit22cb052a90c61cd7d2dd354d0b5d015a34b6e1f7 (patch)
tree96a36c6ec6413d9df111306389383c07f1814787
parent43c6e539d6d334a6cea2f7995df2e62439830227 (diff)
com: Fix bogus NCOM test
* i386/i386at/com.c (comprobe_general): Reject unit being equal to NCOM.
-rw-r--r--i386/i386at/com.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/i386/i386at/com.c b/i386/i386at/com.c
index 02b650b8..3402a025 100644
--- a/i386/i386at/com.c
+++ b/i386/i386at/com.c
@@ -101,7 +101,7 @@ comprobe_general(struct bus_device *dev, int noisy)
char *type = "8250";
int i;
- if ((unit < 0) || (unit > NCOM)) {
+ if ((unit < 0) || (unit >= NCOM)) {
printf("com %d out of range\n", unit);
return(0);
}