-EINVAL is not a valid return value for .of_map_mode, return
REGULATOR_MODE_INVALID instead.
Signed-off-by: Axel Lin <[email protected]>
---
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
Hi Axel,
Thank you for your comment. As the driver is merged, I will make the
change in a future patch-set.
Best regards, Pascal.
Le 10/09/2018 10:52 AM, Axel Lin a ?crit :
> -EINVAL is not a valid return value for .of_map_mode, return
> REGULATOR_MODE_INVALID instead.
>
> Signed-off-by: Axel Lin <[email protected]>
> ---
> 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;
> }
> }
>