mirror of
https://github.com/torvalds/linux.git
synced 2026-12-01 02:54:05 +00:00
Due to14f97f0b8e, the rawnand platforms without "secure-regions" property defined in DT fails to probe. The issue is, of_get_nand_secure_regions() errors out if of_property_count_elems_of_size() returns a negative error code. If the "secure-regions" property is not present in DT, then also we'll get -EINVAL from of_property_count_elems_of_size() but it should not be treated as an error for platforms not declaring "secure-regions" in DT. So fix this behaviour by checking for the existence of that property in DT and return 0 if it is not present. Fixes:14f97f0b8e("mtd: rawnand: Add a check in of_get_nand_secure_regions()") Reported-by: Martin Kaiser <[email protected]> Signed-off-by: Manivannan Sadhasivam <[email protected]> Reviewed-by: Martin Kaiser <[email protected]> Tested-by: Martin Kaiser <[email protected]> Signed-off-by: Miquel Raynal <[email protected]> Link: https://lore.kernel.org/linux-mtd/[email protected]