summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
Diffstat (limited to 'components')
-rw-r--r--components/drivers/regulator/regulator-fan53555.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/components/drivers/regulator/regulator-fan53555.c b/components/drivers/regulator/regulator-fan53555.c
index 3d5e58eb54..f7b68a958f 100644
--- a/components/drivers/regulator/regulator-fan53555.c
+++ b/components/drivers/regulator/regulator-fan53555.c
@@ -550,7 +550,7 @@ static rt_err_t fan53555_regulator_probe(struct rt_i2c_client *client)
{
int slew_idx = freg->slew_rate;
- if (slew_idx > RT_ARRAY_SIZE(slew_rates))
+ if (slew_idx >= RT_ARRAY_SIZE(slew_rates))
{
LOG_E("Invalid slew rate");