diff options
| author | Lucas Stach <l.stach@pengutronix.de> | 2024-01-19 19:50:26 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-03-01 13:35:05 +0100 |
| commit | bc569f86f978133da740870bbb8bef678783788b (patch) | |
| tree | 180c4330a4fa4ee51dfe6bc19f62bc60b2c4b123 /drivers/bus | |
| parent | 9c29933eae402b0e65144cdabda915c5aafadcb5 (diff) | |
| download | linux-bc569f86f978133da740870bbb8bef678783788b.tar.gz linux-bc569f86f978133da740870bbb8bef678783788b.tar.bz2 linux-bc569f86f978133da740870bbb8bef678783788b.zip | |
bus: imx-weim: fix valid range check
[ Upstream commit 7bca405c986075c99b9f729d3587b5c45db39d01 ]
When the range parsing was open-coded the number of u32 entries to
parse had to be a multiple of 4 and the driver checks this. With
the range parsing converted to the range parser the counting changes
from individual u32 entries to a complete range, so the check must
not reject counts not divisible by 4.
Fixes: 2a88e4792c6d ("bus: imx-weim: Remove open coded "ranges" parsing")
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/bus')
| -rw-r--r-- | drivers/bus/imx-weim.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/bus/imx-weim.c b/drivers/bus/imx-weim.c index 42c9386a7b42..f9fd1582f150 100644 --- a/drivers/bus/imx-weim.c +++ b/drivers/bus/imx-weim.c @@ -117,7 +117,7 @@ static int imx_weim_gpr_setup(struct platform_device *pdev) i++; } - if (i == 0 || i % 4) + if (i == 0) goto err; for (i = 0; i < ARRAY_SIZE(gprvals); i++) { |
