]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
of/fdt: Fix incorrect use of dt_root_addr_cells in early_init_dt_check_kho()
authorYuntao Wang <yuntao.wang@linux.dev>
Sat, 15 Nov 2025 13:47:49 +0000 (21:47 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Dec 2025 13:03:08 +0000 (14:03 +0100)
commit0d8e2c04a2ec53d93cc327e12975f611e5df314b
treead1c31a59947095ac6cd126483683a8e149ed6de
parent38c8c945c2c2b404e7203b36023d2aa0a888c617
of/fdt: Fix incorrect use of dt_root_addr_cells in early_init_dt_check_kho()

[ Upstream commit c85da64ce2c36bba469f6feede9ca768f0361741 ]

When reading the fdt_size value, the argument passed to dt_mem_next_cell()
is dt_root_addr_cells, but it should be dt_root_size_cells.

The same issue occurs when reading the scratch_size value.

Use a helper function to simplify the code and fix these issues.

Fixes: 274cdcb1c004 ("arm64: add KHO support")
Signed-off-by: Yuntao Wang <yuntao.wang@linux.dev>
Link: https://patch.msgid.link/20251115134753.179931-5-yuntao.wang@linux.dev
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/of/fdt.c