summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2009-06-18 06:38:27 +0200
committerLen Brown <len.brown@intel.com>2009-06-18 06:38:27 +0200
commit586caae36cece718ff46b3a59b88af79e9f7a2e0 (patch)
treec6b944104c4227c2d302632012224faf0c4d034d
parentACPI: use handle, not device, in system notification path (diff)
downloadlinux-586caae36cece718ff46b3a59b88af79e9f7a2e0.tar.xz
linux-586caae36cece718ff46b3a59b88af79e9f7a2e0.zip
ACPI: battery: fix CONFIG_ACPI_PROCFS_POWER=n build warning
drivers/acpi/battery.c:841: warning: label ‘end’ defined but not used Signed-off-by: Len Brown <len.brown@intel.com>
-rw-r--r--drivers/acpi/battery.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
index eb00c4e3747a..58b4517ce712 100644
--- a/drivers/acpi/battery.c
+++ b/drivers/acpi/battery.c
@@ -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