hwmon: (f75375s) Fix warning message seen in some configurations
authorGuenter Roeck <linux@roeck-us.net>
Sat, 24 Mar 2012 15:38:21 +0000 (08:38 -0700)
committerGuenter Roeck <guenter.roeck@ericsson.com>
Sun, 1 Apr 2012 17:24:34 +0000 (10:24 -0700)
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/f75375s.c: In function 'duty_mode_enabled':
drivers/hwmon/f75375s.c:280: warning: control reaches end of non-void function
drivers/hwmon/f75375s.c: In function 'auto_mode_enabled':
drivers/hwmon/f75375s.c:295: warning: control reaches end of non-void function

Fix the warning by returning something sensible after BUG().

Cc: Nikolaus Schulz <schulz@macnetix.de>
Cc: Riku Voipio <riku.voipio@iki.fi>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
drivers/hwmon/f75375s.c

index 729499e7521038b59bcba9ecc390f875ca8d5966..ece4159bd4536553abafed0689d60d71f361d312 100644 (file)
@@ -276,6 +276,7 @@ static bool duty_mode_enabled(u8 pwm_enable)
                return false;
        default:
                BUG();
+               return true;
        }
 }
 
@@ -291,6 +292,7 @@ static bool auto_mode_enabled(u8 pwm_enable)
                return true;
        default:
                BUG();
+               return false;
        }
 }