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

From: Alexander Stein
Date: Mon Mar 13 2023 - 03:18:46 EST


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@xxxxxxxxxxxxxxx>
---
drivers/base/regmap/regcache.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

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);

--
2.34.1