aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/pmbus
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2013-09-13 13:31:38 -0400
committerGuenter Roeck <linux@roeck-us.net>2013-10-13 19:16:26 -0400
commitaf78fdf4a61827bed7f0fcbba8cc9ae393a3ad82 (patch)
treef3a5e81d9e3b1d1ca063184d79209d5d51d0ac37 /drivers/hwmon/pmbus
parentae02e7418ffa2ba5d927869ef9eab4c87549d8e9 (diff)
hwmon: (pmbus) Don't unnecessarily crash the kernel
pmbus code currently crashes the kernel if it detects an internal implementation error. While the detected condition suggests that there is a bug in the code, it is hardly fatal. Therefore, it should not trigger a crash. Replace BUG() with WARN(). Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/pmbus')
-rw-r--r--drivers/hwmon/pmbus/pmbus_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/pmbus/pmbus_core.c b/drivers/hwmon/pmbus/pmbus_core.c
index 9319fcf142d9..871cf64d2996 100644
--- a/drivers/hwmon/pmbus/pmbus_core.c
+++ b/drivers/hwmon/pmbus/pmbus_core.c
@@ -686,7 +686,7 @@ static int pmbus_get_boolean(struct pmbus_data *data, struct pmbus_boolean *b,
686 if (!s1 && !s2) { 686 if (!s1 && !s2) {
687 ret = !!regval; 687 ret = !!regval;
688 } else if (!s1 || !s2) { 688 } else if (!s1 || !s2) {
689 BUG(); 689 WARN(1, "Bad boolean descriptor %p: s1=%p, s2=%p\n", b, s1, s2);
690 return 0; 690 return 0;
691 } else { 691 } else {
692 long v1, v2; 692 long v1, v2;