Commit 7bca405c authored by Lucas Stach's avatar Lucas Stach Committed by Shawn Guo

bus: imx-weim: fix valid range check

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: 2a88e479 ("bus: imx-weim: Remove open coded "ranges" parsing")
Signed-off-by: default avatarLucas Stach <l.stach@pengutronix.de>
Signed-off-by: default avatarShawn Guo <shawnguo@kernel.org>
parent 690085d8
......@@ -120,7 +120,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++) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment