Skip to content
Commit 103cdd85 authored by Brian Norris's avatar Brian Norris
Browse files

mtd: nand-gpio: don't waste memory for OF failure



We shouldn't try to allocate a resource until we're sure the
of_property_read_u64() call didn't fail. This is especially important if
we use this code for both CONFIG_OF and !CONFIG_OF builds, since
of_property_read_u64() will always return -ENOSYS for !CONFIG_OF.

Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
parent a01eb204
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