mirror of
https://github.com/torvalds/linux.git
synced 2024-12-27 05:11:48 +00:00
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>
This commit is contained in:
parent
674d0ed858
commit
39b103b4d2
@ -275,7 +275,7 @@ static bool duty_mode_enabled(u8 pwm_enable)
|
|||||||
case 3: /* Manual, speed mode */
|
case 3: /* Manual, speed mode */
|
||||||
return false;
|
return false;
|
||||||
default:
|
default:
|
||||||
BUG();
|
WARN(1, "Unexpected pwm_enable value %d\n", pwm_enable);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -291,7 +291,7 @@ static bool auto_mode_enabled(u8 pwm_enable)
|
|||||||
case 4: /* Auto, duty mode */
|
case 4: /* Auto, duty mode */
|
||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
BUG();
|
WARN(1, "Unexpected pwm_enable value %d\n", pwm_enable);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user