Browse Source

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>
Len Brown 16 years ago
parent
commit
586caae36c
1 changed files with 5 additions and 7 deletions
  1. 5 7
      drivers/acpi/battery.c

+ 5 - 7
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