Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 262278
b: refs/heads/master
c: eb03cb0
h: refs/heads/master
v: v3
  • Loading branch information
Stefan Hajnoczi authored and Len Brown committed Jul 16, 2011
1 parent d9593e5 commit 96d535f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e80bba4b5108c6479379740201b0a5d9da5ffbac
refs/heads/master: eb03cb02b74df6dd0b653d5f6d976f16a434dfaf
11 changes: 8 additions & 3 deletions trunk/drivers/acpi/battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -630,8 +630,11 @@ static int acpi_battery_update(struct acpi_battery *battery)
return result;
acpi_battery_init_alarm(battery);
}
if (!battery->bat.dev)
sysfs_add_battery(battery);
if (!battery->bat.dev) {
result = sysfs_add_battery(battery);
if (result)
return result;
}
result = acpi_battery_get_state(battery);
acpi_battery_quirks(battery);
return result;
Expand Down Expand Up @@ -982,7 +985,9 @@ static int acpi_battery_add(struct acpi_device *device)
if (ACPI_SUCCESS(acpi_get_handle(battery->device->handle,
"_BIX", &handle)))
set_bit(ACPI_BATTERY_XINFO_PRESENT, &battery->flags);
acpi_battery_update(battery);
result = acpi_battery_update(battery);
if (result)
goto fail;
#ifdef CONFIG_ACPI_PROCFS_POWER
result = acpi_battery_add_fs(device);
#endif
Expand Down

0 comments on commit 96d535f

Please sign in to comment.