]> git.baikalelectronics.ru Git - kernel.git/commit
hwmon: (ad7314) Fix build warning
authorGuenter Roeck <linux@roeck-us.net>
Fri, 20 Apr 2012 15:39:17 +0000 (11:39 -0400)
committerGuenter Roeck <guenter.roeck@ericsson.com>
Mon, 23 Apr 2012 01:22:53 +0000 (18:22 -0700)
commitacf225d21552dd8680ef2ad14210779e880bee41
tree19437c6a34689a1286ec81f490f48b14c885ff9e
parent8c94d2d2e9c929ec993085434c51908352e0e98a
hwmon: (ad7314) Fix build warning

The following build warning is seen in some configurations.

drivers/hwmon/ad7314.c: In function 'ad7314_show_temperature':
drivers/hwmon/ad7314.c:70: warning: 'data' may be used uninitialized in this function

Fix by overloading the return value from ad7314_spi_read with both data and
error code (the returned data is really u16 and needs to be converted into a
signed value anyway).

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Cc: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Jean Delvare <khali@linux-fr.org>
drivers/hwmon/ad7314.c