From 39b103b4d2e6f006dbd425cf71c46914bd31ce80 Mon Sep 17 00:00:00 2001 From: Guenter Roeck Date: Sat, 14 Sep 2013 00:43:12 -0700 Subject: 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 Signed-off-by: Guenter Roeck --- drivers/hwmon/f75375s.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/hwmon/f75375s.c') diff --git a/drivers/hwmon/f75375s.c b/drivers/hwmon/f75375s.c index a837b94977f..80c42bea90e 100644 --- a/drivers/hwmon/f75375s.c +++ b/drivers/hwmon/f75375s.c @@ -275,7 +275,7 @@ static bool duty_mode_enabled(u8 pwm_enable) case 3: /* Manual, speed mode */ return false; default: - BUG(); + WARN(1, "Unexpected pwm_enable value %d\n", pwm_enable); return true; } } @@ -291,7 +291,7 @@ static bool auto_mode_enabled(u8 pwm_enable) case 4: /* Auto, duty mode */ return true; default: - BUG(); + WARN(1, "Unexpected pwm_enable value %d\n", pwm_enable); return false; } } -- cgit v1.2.3