Skip to content

Commit e350599

Browse files
Dan Carpentersre
authored andcommitted
power: supply: ucs1002: fix error code in ucs1002_get_property()
This function is supposed to return 0 for success instead of returning the val->intval. This makes it the same as the other case statements in this function. Fixes: 81196e2 ("power: supply: ucs1002: fix some health status issues") Signed-off-by: Dan Carpenter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sebastian Reichel <[email protected]>
1 parent 4ec7b66 commit e350599

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/power/supply/ucs1002_power.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,8 @@ static int ucs1002_get_property(struct power_supply *psy,
384384
case POWER_SUPPLY_PROP_USB_TYPE:
385385
return ucs1002_get_usb_type(info, val);
386386
case POWER_SUPPLY_PROP_HEALTH:
387-
return val->intval = info->health;
387+
val->intval = info->health;
388+
return 0;
388389
case POWER_SUPPLY_PROP_PRESENT:
389390
val->intval = info->present;
390391
return 0;

0 commit comments

Comments
 (0)