Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 146313
b: refs/heads/master
c: f0e8527
h: refs/heads/master
i:
  146311: 8609c28
v: v3
  • Loading branch information
Dirk Eibach authored and Linus Torvalds committed Jun 11, 2009
1 parent 5e84ded commit 7726d44
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d7f8d437bda0ec409e26cffb846bc28a40603ee3
refs/heads/master: f0e8527726b9e56649b9eafde3bc0fbc4dd2dd47
5 changes: 5 additions & 0 deletions trunk/drivers/char/moxa.c
Original file line number Diff line number Diff line change
Expand Up @@ -1184,6 +1184,11 @@ static int moxa_open(struct tty_struct *tty, struct file *filp)
return -ENODEV;
}

if (port % MAX_PORTS_PER_BOARD >= brd->numPorts) {
mutex_unlock(&moxa_openlock);
return -ENODEV;
}

ch = &brd->ports[port % MAX_PORTS_PER_BOARD];
ch->port.count++;
tty->driver_data = ch;
Expand Down

0 comments on commit 7726d44

Please sign in to comment.