aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2012-03-24 11:38:21 -0400
committerGuenter Roeck <guenter.roeck@ericsson.com>2012-04-01 13:24:34 -0400
commit6394011d65b7e74666f07cca98747601cf8298fa (patch)
tree18036d2fd612797970611b65f19c91947687af9f
parent52f30f77171f934cb9562908cb279178b890a048 (diff)
hwmon: (f75375s) Fix warning message 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/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>
-rw-r--r--drivers/hwmon/f75375s.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/hwmon/f75375s.c b/drivers/hwmon/f75375s.c
index 729499e75210..ece4159bd453 100644
--- a/drivers/hwmon/f75375s.c
+++ b/drivers/hwmon/f75375s.c
@@ -276,6 +276,7 @@ static bool duty_mode_enabled(u8 pwm_enable)
276 return false; 276 return false;
277 default: 277 default:
278 BUG(); 278 BUG();
279 return true;
279 } 280 }
280} 281}
281 282
@@ -291,6 +292,7 @@ static bool auto_mode_enabled(u8 pwm_enable)
291 return true; 292 return true;
292 default: 293 default:
293 BUG(); 294 BUG();
295 return false;
294 } 296 }
295} 297}
296 298