[v2,2/2] regmap: cache: Fix return value

Message ID 20230313071812.13577-2-alexander.stein@ew.tq-group.com
State New
Headers
Series [v2,1/2] regmap: cache: Return error in cache sync operations for REGCACHE_NONE |

Commit Message

Alexander Stein March 13, 2023, 7:18 a.m. UTC
  checkpatch.pl warned:
WARNING: ENOSYS means 'invalid syscall nr' and nothing else
Align the return value to regcache_drop_region().

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
---
 drivers/base/regmap/regcache.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap/regcache.c
index 8031007b4887d..0482cf1c3231b 100644
--- a/drivers/base/regmap/regcache.c
+++ b/drivers/base/regmap/regcache.c
@@ -242,7 +242,7 @@  int regcache_read(struct regmap *map,
 	int ret;
 
 	if (map->cache_type == REGCACHE_NONE)
-		return -ENOSYS;
+		return -EINVAL;
 
 	BUG_ON(!map->cache_ops);