Skip to content

Commit

Permalink
ACPI: battery: fix CONFIG_ACPI_PROCFS_POWER=n build warning
Browse files Browse the repository at this point in the history
drivers/acpi/battery.c:841: warning: label ‘end’ defined but not used

Signed-off-by: Len Brown <len.brown@intel.com>
  • Loading branch information
Len Brown committed Jun 18, 2009
1 parent ff754e2 commit 586caae
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions drivers/acpi/battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -832,14 +832,12 @@ static int acpi_battery_add(struct acpi_device *device)
acpi_battery_update(battery);
#ifdef CONFIG_ACPI_PROCFS_POWER
result = acpi_battery_add_fs(device);
if (result)
goto end;
#endif
printk(KERN_INFO PREFIX "%s Slot [%s] (battery %s)\n",
ACPI_BATTERY_DEVICE_NAME, acpi_device_bid(device),
device->status.battery_present ? "present" : "absent");
end:
if (result) {
if (!result) {
printk(KERN_INFO PREFIX "%s Slot [%s] (battery %s)\n",
ACPI_BATTERY_DEVICE_NAME, acpi_device_bid(device),
device->status.battery_present ? "present" : "absent");
} else {
#ifdef CONFIG_ACPI_PROCFS_POWER
acpi_battery_remove_fs(device);
#endif
Expand Down

0 comments on commit 586caae

Please sign in to comment.