hwmon: (acpi_power_meter) Fix compiler warning seen in some configurations
authorGuenter Roeck <linux@roeck-us.net>
Wed, 28 Mar 2012 16:03:26 +0000 (09:03 -0700)
committerGuenter Roeck <guenter.roeck@ericsson.com>
Mon, 9 Apr 2012 19:17:37 +0000 (12:17 -0700)
commit776cdc11b3b0fc21e34600e22abe1c8209d2f3f0
tree88bc3de50013a9e63b36fbfe82a199a447dc74f4
parent8528e07edfc6ac5a793509f305b9c3c4fb3672c0
hwmon: (acpi_power_meter) Fix compiler warning seen in some configurations

In some configurations, BUG() does not result in an endless loop but returns
to the caller. This results in the following compiler warning:

drivers/hwmon/acpi_power_meter.c: In function 'show_str':
drivers/hwmon/acpi_power_meter.c:380: warning: 'val' may be used uninitialized in this function

Fix the warning by setting val to an empty string after BUG().

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Robert Coulson <robert.coulson@ericsson.com>
drivers/hwmon/acpi_power_meter.c