Skip to content

Commit

Permalink
regulator: stpmic1: Return REGULATOR_MODE_INVALID for invalid mode
Browse files Browse the repository at this point in the history
-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>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Axel Lin authored and Mark Brown committed Oct 10, 2018
1 parent ca55b71 commit c18fb34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/regulator/stpmic1_regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down

0 comments on commit c18fb34

Please sign in to comment.