The > should be >= or we read one element past the end of the array.
Fixes: c21e0bbfc485 ('cxlflash: Base support for IBM CXL Flash Adapter')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
        u64 *fc_regs;
 
        rc = kstrtouint((attr->attr.name + 4), 10, &port);
-       if (rc || (port > NUM_FC_PORTS))
+       if (rc || (port >= NUM_FC_PORTS))
                return 0;
 
        fc_regs = &afu->afu_map->global.fc_regs[port][0];