mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-16 04:04:06 +00:00
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: 2a88e4792c
("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>
This commit is contained in:
parent
9c29933eae
commit
bc569f86f9
1 changed files with 1 additions and 1 deletions
|
@ -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++) {
|
||||
|
|
Loading…
Add table
Reference in a new issue