mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-10-22 23:13:01 +02:00
of: property: Avoiding using uninitialized variable @imaplen in parse_interrupt_map()
parse_interrupt_map() will use uninitialized variable @imaplen if fails
to get property 'interrupt-map'.
Fix by using the variable after successfully getting the property.
Fixes: e7985f4360
("of: property: Fix fw_devlink handling of interrupt-map")
Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20250109-of_core_fix-v4-6-db8a72415b8c@quicinc.com
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
This commit is contained in:
parent
e4c00c9b1f
commit
f73780e772
|
@ -1391,9 +1391,9 @@ static struct device_node *parse_interrupt_map(struct device_node *np,
|
|||
addrcells = of_bus_n_addr_cells(np);
|
||||
|
||||
imap = of_get_property(np, "interrupt-map", &imaplen);
|
||||
imaplen /= sizeof(*imap);
|
||||
if (!imap)
|
||||
return NULL;
|
||||
imaplen /= sizeof(*imap);
|
||||
|
||||
imap_end = imap + imaplen;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user