]> git.ipfire.org Git - thirdparty/linux.git/commit
hwmon: (max6650) Fix unused variable warning
authorArnd Bergmann <arnd@arndb.de>
Mon, 17 Jun 2019 12:34:30 +0000 (14:34 +0200)
committerGuenter Roeck <linux@roeck-us.net>
Mon, 24 Jun 2019 01:33:01 +0000 (18:33 -0700)
commit3253854dc19f1610b8d01fb9265bbd98ce18abd7
tree228acd9bfef123f4884162accef70450d9b31f8a
parent7d45deb31bec3992cd92a240946fbf872661fa2c
hwmon: (max6650) Fix unused variable warning

The newly added variable is only used in an #if block:

drivers/hwmon/max6650.c: In function 'max6650_probe':
drivers/hwmon/max6650.c:766:33: error: unused variable 'cooling_dev' [-Werror=unused-variable]

Change the #if to if() so the compiler can see what is actually
going on.

Fixes: a8463754a5a9 ("hwmon: (max6650) Use devm function to register thermal device")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/max6650.c