summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/soc/imx/imx8m-blk-ctrl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/soc/imx/imx8m-blk-ctrl.c b/drivers/soc/imx/imx8m-blk-ctrl.c
index e172d295c441..519b3651d1d9 100644
--- a/drivers/soc/imx/imx8m-blk-ctrl.c
+++ b/drivers/soc/imx/imx8m-blk-ctrl.c
@@ -139,7 +139,7 @@ imx8m_blk_ctrl_xlate(struct of_phandle_args *args, void *data)
unsigned int index = args->args[0];
if (args->args_count != 1 ||
- index > onecell_data->num_domains)
+ index >= onecell_data->num_domains)
return ERR_PTR(-EINVAL);
return onecell_data->domains[index];