diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2006-12-08 11:38:57 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-08 17:28:58 +0100 |
commit | 17c4edf0c8ee670de7b33d2a24eddd7c6b7edcf6 (patch) | |
tree | 3c6d65a9f49d2319272e11ab14094266f381147d /drivers/char/isicom.c | |
parent | [PATCH] Char: isicom, remove cvs stuff (diff) | |
download | linux-17c4edf0c8ee670de7b33d2a24eddd7c6b7edcf6.tar.xz linux-17c4edf0c8ee670de7b33d2a24eddd7c6b7edcf6.zip |
[PATCH] Char: isicom, fix tty index check
Since tty->index is signed and may be < 0, we should assign this to int not
uint. There is already a check to ensure if it is not negative, but gcc
complains with -W flag enabled and it is perfectly correct:
drivers/char/isicom.c:953: warning: comparison of unsigned expression < 0
is always false
Fix this issue by converting `line' variable from uint to int.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char/isicom.c')
-rw-r--r-- | drivers/char/isicom.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/char/isicom.c b/drivers/char/isicom.c index adab41cdab65..5a747e685993 100644 --- a/drivers/char/isicom.c +++ b/drivers/char/isicom.c @@ -946,8 +946,8 @@ static int isicom_open(struct tty_struct *tty, struct file *filp) { struct isi_port *port; struct isi_board *card; - unsigned int line, board; - int error; + unsigned int board; + int error, line; line = tty->index; if (line < 0 || line > PORT_COUNT-1) |