Skip to content

Commit

Permalink
regulator: stubs: Make stub regulator_get_voltage() return an error
Browse files Browse the repository at this point in the history
Returning 0 isn't useful, it's not even meaningful if there is a real
regulator there.

Reported-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Mark Brown committed Jun 18, 2012
1 parent 230a5a1 commit 08aed2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/regulator/consumer.h
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ static inline int regulator_set_voltage(struct regulator *regulator,

static inline int regulator_get_voltage(struct regulator *regulator)
{
return 0;
return -EINVAL;
}

static inline int regulator_set_current_limit(struct regulator *regulator,
Expand Down

0 comments on commit 08aed2f

Please sign in to comment.