summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGUI <[email protected]>2024-05-28 09:52:10 +0800
committerGitHub <[email protected]>2024-05-28 09:52:10 +0800
commit8c6c9205b01b14e99d41ddbc608fb4eef5d0362f (patch)
tree2765372aad25447f0968d62ce5e3ceaf9468a074
parent754c59a41185fadd543ae2eaee518ebcbe68af5b (diff)
[OFW] Fixup irq parse map and map mask (#8992)
`map_len` and `map_mask_len` is the count of elements, not the bytes size of elements. Signed-off-by: GuEe-GUI <[email protected]>
-rwxr-xr-xcomponents/drivers/ofw/irq.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/drivers/ofw/irq.c b/components/drivers/ofw/irq.c
index d5b2fb5a30..f15c511dc0 100755
--- a/components/drivers/ofw/irq.c
+++ b/components/drivers/ofw/irq.c
@@ -196,8 +196,8 @@ static rt_err_t ofw_parse_irq_map(struct rt_ofw_node *np, struct rt_ofw_cell_arg
break;
}
- map_len = sizeof(fdt32_t);
- map_mask_len = sizeof(fdt32_t);
+ map_len /= sizeof(fdt32_t);
+ map_mask_len /= sizeof(fdt32_t);
err = -RT_EINVAL;