Skip to content

Commit ec10b0e

Browse files
AxelLinLiam Girdwood
authored and
Liam Girdwood
committed
regulator: max8952 - fix max8952_set_voltage
In current implementation, vid is declared as u8, then "vid == -1" is always false, and "vid >= 0" is always true. Thus change it to s8. Signed-off-by: Axel Lin <[email protected]> Acked-by: Mark Brown <[email protected]> Acked-by: Kyungmin Park <[email protected]> Signed-off-by: Liam Girdwood <[email protected]>
1 parent da05738 commit ec10b0e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/regulator/max8952.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ static int max8952_set_voltage(struct regulator_dev *rdev,
136136
int min_uV, int max_uV)
137137
{
138138
struct max8952_data *max8952 = rdev_get_drvdata(rdev);
139-
u8 vid = -1, i;
139+
s8 vid = -1, i;
140140

141141
if (!gpio_is_valid(max8952->pdata->gpio_vid0) ||
142142
!gpio_is_valid(max8952->pdata->gpio_vid0)) {

0 commit comments

Comments
 (0)