diff options
author | Guenter Roeck <linux@roeck-us.net> | 2013-09-14 03:43:12 -0400 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2013-10-13 19:16:27 -0400 |
commit | 39b103b4d2e6f006dbd425cf71c46914bd31ce80 (patch) | |
tree | cb60f01af6e34b00083d5cb1dbece7b21a1cd87f /drivers/hwmon/f75375s.c | |
parent | 674d0ed8588c11ec9f70c8427ac83a73e0d156d5 (diff) |
hwmon: (f75375s) Don't crash the kernel unnecessarily
The f75375s driver crashes the kernel if it detects an an internal
implementation error. While the detected conditions suggest that
there is a bug in the code, the condition is not fatal.
Replace BUG() with WARN().
Cc: Riku Voipio <riku.voipio@iki.fi>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/f75375s.c')
-rw-r--r-- | drivers/hwmon/f75375s.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hwmon/f75375s.c b/drivers/hwmon/f75375s.c index a837b94977f4..80c42bea90ed 100644 --- a/drivers/hwmon/f75375s.c +++ b/drivers/hwmon/f75375s.c | |||
@@ -275,7 +275,7 @@ static bool duty_mode_enabled(u8 pwm_enable) | |||
275 | case 3: /* Manual, speed mode */ | 275 | case 3: /* Manual, speed mode */ |
276 | return false; | 276 | return false; |
277 | default: | 277 | default: |
278 | BUG(); | 278 | WARN(1, "Unexpected pwm_enable value %d\n", pwm_enable); |
279 | return true; | 279 | return true; |
280 | } | 280 | } |
281 | } | 281 | } |
@@ -291,7 +291,7 @@ static bool auto_mode_enabled(u8 pwm_enable) | |||
291 | case 4: /* Auto, duty mode */ | 291 | case 4: /* Auto, duty mode */ |
292 | return true; | 292 | return true; |
293 | default: | 293 | default: |
294 | BUG(); | 294 | WARN(1, "Unexpected pwm_enable value %d\n", pwm_enable); |
295 | return false; | 295 | return false; |
296 | } | 296 | } |
297 | } | 297 | } |