mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
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>
This commit is contained in:
parent
52f30f7717
commit
6394011d65
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue