diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/i3c/master.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c index bda4b9613e53..c39f89d2deba 100644 --- a/drivers/i3c/master.c +++ b/drivers/i3c/master.c @@ -475,7 +475,7 @@ static ssize_t mode_show(struct device *dev, i3c_bus_normaluse_lock(i3cbus); if (i3cbus->mode < 0 || - i3cbus->mode > ARRAY_SIZE(i3c_bus_mode_strings) || + i3cbus->mode >= ARRAY_SIZE(i3c_bus_mode_strings) || !i3c_bus_mode_strings[i3cbus->mode]) ret = sprintf(buf, "unknown\n"); else |