summaryrefslogtreecommitdiff
path: root/drivers/bus
diff options
context:
space:
mode:
authorLucas Stach <l.stach@pengutronix.de>2024-01-19 21:50:26 +0300
committerShawn Guo <shawnguo@kernel.org>2024-02-06 09:10:47 +0300
commit7bca405c986075c99b9f729d3587b5c45db39d01 (patch)
tree2f2a6b89d4ec504c8454a73b2c09924166cc1f57 /drivers/bus
parent690085d866f08cc72ae4d601821564a0b63e32f3 (diff)
downloadlinux-7bca405c986075c99b9f729d3587b5c45db39d01.tar.xz
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: 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>
Diffstat (limited to 'drivers/bus')
-rw-r--r--drivers/bus/imx-weim.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/bus/imx-weim.c b/drivers/bus/imx-weim.c
index 6b5da73c8541..837bf9d51c6e 100644
--- a/drivers/bus/imx-weim.c
+++ b/drivers/bus/imx-weim.c
@@ -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++) {