提交 6394011d 编写于 作者: G Guenter Roeck 提交者: Guenter Roeck

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: NGuenter Roeck <linux@roeck-us.net>
Acked-by: NJean Delvare <khali@linux-fr.org>
Signed-off-by: NGuenter Roeck <guenter.roeck@ericsson.com>
上级 52f30f77
...@@ -276,6 +276,7 @@ static bool duty_mode_enabled(u8 pwm_enable) ...@@ -276,6 +276,7 @@ static bool duty_mode_enabled(u8 pwm_enable)
return false; return false;
default: default:
BUG(); BUG();
return true;
} }
} }
...@@ -291,6 +292,7 @@ static bool auto_mode_enabled(u8 pwm_enable) ...@@ -291,6 +292,7 @@ static bool auto_mode_enabled(u8 pwm_enable)
return true; return true;
default: default:
BUG(); BUG();
return false;
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册