Skip to content
Commit 49e67dd1 authored by Johan Hovold's avatar Johan Hovold Committed by Rob Herring
Browse files

of: fdt: add missing allocation-failure check



The memory allocator passed to __unflatten_device_tree() (e.g. a wrapped
kzalloc) can fail so add the missing sanity check to avoid dereferencing
a NULL pointer.

Fixes: fe140423 ("of/flattree: Refactor unflatten_device_tree and add fdt_unflatten_tree")
Cc: stable <stable@vger.kernel.org>     # 2.6.38
Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
Signed-off-by: default avatarRob Herring <robh@kernel.org>
parent 828d4cdd
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment