mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-12-01 00:12:36 -05:00
UPSTREAM: HID: playstation: fix unused variable in ps_battery_get_property.
The ret variable in ps_battery_get_property is set in an error path, but never actually returned. Change the function to return ret. Reported-by: kernel test robot <[email protected]> Signed-off-by: Roderick Colenbrander <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]> Bug: 167947264 Change-Id: Ieeaff4d249a6ee6d02eb4746f9fe502c91c6f40a (cherry picked from commit 5fb52551248f54ddc8f72bc252661468b603cfcc) Signed-off-by: Farid Chahla <[email protected]>
This commit is contained in:
parent
6c0bf9e6af
commit
8e0061c2c3
1 changed files with 2 additions and 2 deletions
|
|
@ -333,7 +333,7 @@ static int ps_battery_get_property(struct power_supply *psy,
|
|||
uint8_t battery_capacity;
|
||||
int battery_status;
|
||||
unsigned long flags;
|
||||
int ret;
|
||||
int ret = 0;
|
||||
|
||||
spin_lock_irqsave(&dev->lock, flags);
|
||||
battery_capacity = dev->battery_capacity;
|
||||
|
|
@ -358,7 +358,7 @@ static int ps_battery_get_property(struct power_supply *psy,
|
|||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int ps_device_register_battery(struct ps_device *dev)
|
||||
|
|
|
|||
Loading…
Reference in a new issue