Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9a2f1aad authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'for-v3.13-fixes' of git://git.infradead.org/battery-2.6

Pull battery fixes from Anton Vorontsov:
 "Two fixes:

   - fix build error caused by max17042_battery conversion to the regmap
     API.

   - fix kernel oops when booting with wakeup_source_activate enabled"

* tag 'for-v3.13-fixes' of git://git.infradead.org/battery-2.6:
  max17042_battery: Fix build errors caused by missing REGMAP_I2C config
  power_supply: Fix Oops from NULL pointer dereference from wakeup_source_activate
parents 23e8e590 93353e80
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -196,6 +196,7 @@ config BATTERY_MAX17040
config BATTERY_MAX17042
	tristate "Maxim MAX17042/17047/17050/8997/8966 Fuel Gauge"
	depends on I2C
	select REGMAP_I2C
	help
	  MAX17042 is fuel-gauge systems for lithium-ion (Li+) batteries
	  in handheld and portable equipment. The MAX17042 is configured
+6 −6
Original line number Diff line number Diff line
@@ -511,6 +511,10 @@ int power_supply_register(struct device *parent, struct power_supply *psy)
	dev_set_drvdata(dev, psy);
	psy->dev = dev;

	rc = dev_set_name(dev, "%s", psy->name);
	if (rc)
		goto dev_set_name_failed;

	INIT_WORK(&psy->changed_work, power_supply_changed_work);

	rc = power_supply_check_supplies(psy);
@@ -524,10 +528,6 @@ int power_supply_register(struct device *parent, struct power_supply *psy)
	if (rc)
		goto wakeup_init_failed;

	rc = kobject_set_name(&dev->kobj, "%s", psy->name);
	if (rc)
		goto kobject_set_name_failed;

	rc = device_add(dev);
	if (rc)
		goto device_add_failed;
@@ -553,11 +553,11 @@ create_triggers_failed:
register_cooler_failed:
	psy_unregister_thermal(psy);
register_thermal_failed:
wakeup_init_failed:
	device_del(dev);
kobject_set_name_failed:
device_add_failed:
wakeup_init_failed:
check_supplies_failed:
dev_set_name_failed:
	put_device(dev);
success:
	return rc;