Skip to content
Commit 086336a2 authored by Heiko Stuebner's avatar Heiko Stuebner Committed by Simon Glass
Browse files

fdtdec: protect against another NULL phandlep in fdtdec_add_reserved_memory()



The change adding fdtdec_add_reserved_memory() already protected the added
phandle against the phandlep being NULL - making the phandlep var optional.

But in the early code checking for an already existing carveout this check
was not done and thus the phandle assignment could run into trouble,
so add a check there as well, which makes the function still return
successfully if a matching region is found, even though no-one wants to
work with the phandle.

Fixes: c9222a08 ("fdtdec: Implement fdtdec_add_reserved_memory()")
Signed-off-by: default avatarHeiko Stuebner <heiko.stuebner@theobroma-systems.com>
Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
parent 1dd49f57
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment