cacheinfo: Keep the old value if of_property_read_u32 fails
authorHuacai Chen <chenhc@lemote.com>
Wed, 19 Dec 2018 08:16:03 +0000 (16:16 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 22 Jan 2019 12:50:31 +0000 (13:50 +0100)
commit3a34c986324c07dde32903f7bb262e6138e77c2a
treecc9fb51305015a68b79c8170d7f81f91ab49d3ff
parent1c7fc5cbc33980acd13d668f1c8f0313d6ae9fd8
cacheinfo: Keep the old value if of_property_read_u32 fails

Commit 448a5a552f336bd7b847b1951 ("drivers: base: cacheinfo: use OF
property_read_u32 instead of get_property,read_number") makes cache
size and number_of_sets be 0 if DT doesn't provide there values. I
think this is unreasonable so make them keep the old values, which is
the same as old kernels.

Fixes: 448a5a552f33 ("drivers: base: cacheinfo: use OF property_read_u32 instead of get_property,read_number")
Cc: stable@vger.kernel.org
Signed-off-by: Huacai Chen <chenhc@lemote.com>
Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/cacheinfo.c