mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 14:04:54 +02: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 <lkp@intel.com>
Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Change-Id: Ieeaff4d249a6ee6d02eb4746f9fe502c91c6f40a
(cherry picked from commit 5fb5255124)
Signed-off-by: Kim Low <kim-huei.low@sony.com>
This commit is contained in:
parent
353318aa60
commit
2dcc66a28f
|
|
@ -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 New Issue
Block a user