Skip to content

Commit 70d2bec

Browse files
committed
Merge tag 'for-v5.17-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply
Pull power supply fixes from Sebastian Reichel: "Three regression fixes for the 5.17 cycle: - build warning fix for power-supply documentation - pointer size fix in cw2015 battery driver - OOM handling in bq256xx charger driver" * tag 'for-v5.17-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: power: supply: bq256xx: Handle OOM correctly power: supply: core: fix application of sizeof to pointer power: supply: fix table problem in sysfs-class-power
2 parents 7f25f04 + f444578 commit 70d2bec

3 files changed

Lines changed: 5 additions & 1 deletion

File tree

Documentation/ABI/testing/sysfs-class-power

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,7 @@ Description:
468468
auto: Charge normally, respect thresholds
469469
inhibit-charge: Do not charge while AC is attached
470470
force-discharge: Force discharge while AC is attached
471+
================ ====================================
471472

472473
What: /sys/class/power_supply/<supply_name>/technology
473474
Date: May 2007

drivers/power/supply/bq256xx_charger.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1523,6 +1523,9 @@ static int bq256xx_hw_init(struct bq256xx_device *bq)
15231523
BQ256XX_WDT_BIT_SHIFT);
15241524

15251525
ret = power_supply_get_battery_info(bq->charger, &bat_info);
1526+
if (ret == -ENOMEM)
1527+
return ret;
1528+
15261529
if (ret) {
15271530
dev_warn(bq->dev, "battery info missing, default values will be applied\n");
15281531

drivers/power/supply/cw2015_battery.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,7 @@ static int cw_bat_probe(struct i2c_client *client)
689689
if (ret) {
690690
/* Allocate an empty battery */
691691
cw_bat->battery = devm_kzalloc(&client->dev,
692-
sizeof(cw_bat->battery),
692+
sizeof(*cw_bat->battery),
693693
GFP_KERNEL);
694694
if (!cw_bat->battery)
695695
return -ENOMEM;

0 commit comments

Comments
 (0)