Commit f52e7cca authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] Fix sign handling bugs in epca

From: Ravikiran G Thirumalai <kiran@in.ibm.com>

Don't check unsigned values for <= 0.
parent 663c17b6
...@@ -3640,7 +3640,7 @@ void epca_setup(char *str, int *ints) ...@@ -3640,7 +3640,7 @@ void epca_setup(char *str, int *ints)
case 5: case 5:
board.port = (unsigned char *)ints[index]; board.port = (unsigned char *)ints[index];
if (board.port <= 0) if (ints[index] <= 0)
{ {
printk(KERN_ERR "<Error> - epca_setup: Invalid io port 0x%x\n", (unsigned int)board.port); printk(KERN_ERR "<Error> - epca_setup: Invalid io port 0x%x\n", (unsigned int)board.port);
invalid_lilo_config = 1; invalid_lilo_config = 1;
...@@ -3652,7 +3652,7 @@ void epca_setup(char *str, int *ints) ...@@ -3652,7 +3652,7 @@ void epca_setup(char *str, int *ints)
case 6: case 6:
board.membase = (unsigned char *)ints[index]; board.membase = (unsigned char *)ints[index];
if (board.membase <= 0) if (ints[index] <= 0)
{ {
printk(KERN_ERR "<Error> - epca_setup: Invalid memory base 0x%x\n",(unsigned int)board.membase); printk(KERN_ERR "<Error> - epca_setup: Invalid memory base 0x%x\n",(unsigned int)board.membase);
invalid_lilo_config = 1; invalid_lilo_config = 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment