]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Fix sign handling bugs in epca
authorAndrew Morton <akpm@digeo.com>
Sat, 14 Jun 2003 14:22:34 +0000 (07:22 -0700)
committerLinus Torvalds <torvalds@home.transmeta.com>
Sat, 14 Jun 2003 14:22:34 +0000 (07:22 -0700)
From: Ravikiran G Thirumalai <kiran@in.ibm.com>

Don't check unsigned values for <= 0.

drivers/char/epca.c

index d26e9ed868a12dfc0bce6fa6cd09dcdc9ef1501e..0ebdae678f6958e5230b7983d81efa1003248146 100644 (file)
@@ -3640,7 +3640,7 @@ void epca_setup(char *str, int *ints)
 
                        case 5:
                                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);
                                        invalid_lilo_config = 1;
@@ -3652,7 +3652,7 @@ void epca_setup(char *str, int *ints)
 
                        case 6:
                                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);
                                        invalid_lilo_config = 1;