cacheinfo: Return error code in init_of_cache_level()
authorPierre Gondois <pierre.gondois@arm.com>
Wed, 4 Jan 2023 18:30:25 +0000 (19:30 +0100)
committerSudeep Holla <sudeep.holla@arm.com>
Tue, 17 Jan 2023 22:00:06 +0000 (22:00 +0000)
commit8844c3df001bc1d8397fddea341308da63855d53
tree59363df47a7aa67a555cd76c0649e4897723a8ce
parentc3719bd9eeb2edf84bd263d662e36ca0ba262a23
cacheinfo: Return error code in init_of_cache_level()

Make init_of_cache_level() return an error code when the cache
information parsing fails to help detecting missing information.

init_of_cache_level() is only called for riscv. Returning an error
code instead of 0 will prevent detect_cache_attributes() to allocate
memory if an incomplete DT is parsed.

Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
Acked-by: Palmer Dabbelt <palmer@rivosinc.com>
Link: https://lore.kernel.org/r/20230104183033.755668-3-pierre.gondois@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
drivers/base/cacheinfo.c