diff options
author | Manivannan Sadhasivam <[email protected]> | 2021-07-27 11:58:13 +0530 |
---|---|---|
committer | Miquel Raynal <[email protected]> | 2021-08-06 21:44:16 +0200 |
commit | b48027083a78b13356695555a05b0e085e378687 (patch) | |
tree | 43bd0478a201eb645d1fa99fd7b3f0fdbfe456e8 /lib/test_overflow.c | |
parent | b7abb051682263e51866bc78762fd0083d64c5ed (diff) |
mtd: rawnand: Fix probe failure due to of_get_nand_secure_regions()
Due to 14f97f0b8e2b, 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: 14f97f0b8e2b ("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]
Diffstat (limited to 'lib/test_overflow.c')
0 files changed, 0 insertions, 0 deletions