public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] regulator: stpmic1: Return REGULATOR_MODE_INVALID for invalid mode
@ 2018-10-09  8:52 Axel Lin
  2018-10-18  9:12 ` Pascal PAILLET-LME
  0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2018-10-09  8:52 UTC (permalink / raw)
  To: Mark Brown; +Cc: pascal paillet, Liam Girdwood, linux-kernel, Axel Lin

-EINVAL is not a valid return value for .of_map_mode, return
REGULATOR_MODE_INVALID instead.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/regulator/stpmic1_regulator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/stpmic1_regulator.c b/drivers/regulator/stpmic1_regulator.c
index 96f18083a3b6..e15634edb8ce 100644
--- a/drivers/regulator/stpmic1_regulator.c
+++ b/drivers/regulator/stpmic1_regulator.c
@@ -441,7 +441,7 @@ static unsigned int stpmic1_map_mode(unsigned int mode)
 	case STPMIC1_BUCK_MODE_LP:
 		return REGULATOR_MODE_STANDBY;
 	default:
-		return -EINVAL;
+		return REGULATOR_MODE_INVALID;
 	}
 }
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-10-18  9:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-09  8:52 [PATCH] regulator: stpmic1: Return REGULATOR_MODE_INVALID for invalid mode Axel Lin
2018-10-18  9:12 ` Pascal PAILLET-LME

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox