regmap: cache: Return error in cache sync operations for REGCACHE_NONE
authorAlexander Stein <alexander.stein@ew.tq-group.com>
Mon, 13 Mar 2023 07:18:11 +0000 (08:18 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 May 2023 16:32:34 +0000 (17:32 +0100)
commit10add04ee6083a942d1c6aebb7257ac4eaa35e9e
treeb0d1e59b3206802550f853f9b14e68e039d2d0ce
parent34813f041d0e627905f47ccadc94a7fc566104d0
regmap: cache: Return error in cache sync operations for REGCACHE_NONE

[ Upstream commit fd883d79e4dcd2417c2b80756f22a2ff03b0f6e0 ]

There is no sense in doing a cache sync on REGCACHE_NONE regmaps.
Instead of panicking the kernel due to missing cache_ops, return an error
to client driver.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Link: https://lore.kernel.org/r/20230313071812.13577-1-alexander.stein@ew.tq-group.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/base/regmap/regcache.c