fdc765: fix off by one
authorAlan Cox <alan@linux.intel.com>
Thu, 28 Feb 2019 21:30:47 +0000 (21:30 +0000)
committerAlan Cox <alan@linux.intel.com>
Thu, 28 Feb 2019 21:30:47 +0000 (21:30 +0000)
Kernel/dev/devfdc765.c

index 2ef9e4b..ef0bb05 100644 (file)
@@ -20,7 +20,7 @@ static uint8_t trackpos[4] = { 0xFF, 0xFF, 0xFF, 0xFF };
 int devfd_open(uint8_t minor, uint16_t flag)
 {
     flag;
-    if(minor > FDC765_MAX_FLOPPY) {
+    if(minor >= FDC765_MAX_FLOPPY) {
         udata.u_error = ENODEV;
         return -1;
     }