summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/cxlflash/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/cxlflash/main.c')
-rw-r--r--drivers/scsi/cxlflash/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/cxlflash/main.c b/drivers/scsi/cxlflash/main.c
index 458ed838f83a..fde2ba9342dc 100644
--- a/drivers/scsi/cxlflash/main.c
+++ b/drivers/scsi/cxlflash/main.c
@@ -586,7 +586,7 @@ static ssize_t cxlflash_show_port_status(struct device *dev,
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];
OpenPOWER on IntegriCloud