ACPI: SBS: Fix retval warning
authorJeff Garzik <jgarzik@redhat.com>
Sat, 17 Nov 2007 21:32:31 +0000 (00:32 +0300)
committerLen Brown <len.brown@intel.com>
Sun, 18 Nov 2007 22:24:01 +0000 (17:24 -0500)
commit037cbc63fd83162a8ee0c69680207ce4609adbea
tree8a059dc10281006bfd18abb2cc6aa78eed6e53d6
parent4c41d3ad6544f1c9aec37c441af04f5d0ad3a731
ACPI: SBS: Fix retval warning

drivers/acpi/sbs.c: In function acpi_battery_add:
drivers/acpi/sbs.c:811: warning: ignoring return value of device_create_file,
declared with attribute warn_unused_result

Additional cleanups:
* use struct acpi_battery in acpi_battery_remove() to clean up function
calls, just like acpi_battery_add() already does.

* put braces around unregister call, as it depends on dev being not NULL.

* remove unneeded braces

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/sbs.c