]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] s390: cio max channels checks
authorCornelia Huck <cohuck@de.ibm.com>
Wed, 22 Jun 2005 00:16:26 +0000 (17:16 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Wed, 22 Jun 2005 02:07:32 +0000 (19:07 -0700)
Fix max channel check in cio_ignore display function.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/s390/cio/blacklist.c

index 4a06c7d0e5e4950899007faebc31725caf900119..aac83ce6469cf8ef57e9926848993dd6a27f2c2a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *  drivers/s390/cio/blacklist.c
  *   S/390 common I/O routines -- blacklisting of specific devices
- *   $Revision: 1.33 $
+ *   $Revision: 1.34 $
  *
  *    Copyright (C) 1999-2002 IBM Deutschland Entwicklung GmbH,
  *                           IBM Corporation
@@ -289,7 +289,7 @@ static int cio_ignore_read (char *page, char **start, off_t off,
        len = 0;
        for (devno = off; /* abuse the page variable
                           * as counter, see fs/proc/generic.c */
-            devno <= __MAX_SUBCHANNELS && len + entry_size < count; devno++) {
+            devno < __MAX_SUBCHANNELS && len + entry_size < count; devno++) {
                if (!test_bit(devno, bl_dev))
                        continue;
                len += sprintf(page + len, "0.0.%04lx", devno);
@@ -302,7 +302,7 @@ static int cio_ignore_read (char *page, char **start, off_t off,
                len += sprintf(page + len, "\n");
        }
 
-       if (devno <= __MAX_SUBCHANNELS)
+       if (devno < __MAX_SUBCHANNELS)
                *eof = 1;
        *start = (char *) (devno - off); /* number of checked entries */
        return len;