Skip to content

Commit 7bca405

Browse files
lynxeye-devShawn Guo
authored andcommitted
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: 2a88e47 ("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>
1 parent 690085d commit 7bca405

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/bus/imx-weim.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ static int imx_weim_gpr_setup(struct platform_device *pdev)
120120
i++;
121121
}
122122

123-
if (i == 0 || i % 4)
123+
if (i == 0)
124124
goto err;
125125

126126
for (i = 0; i < ARRAY_SIZE(gprvals); i++) {

0 commit comments

Comments
 (0)