diff options
author | Guenter Roeck <linux@roeck-us.net> | 2013-09-13 10:31:38 -0700 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2013-10-13 16:16:26 -0700 |
commit | af78fdf4a61827bed7f0fcbba8cc9ae393a3ad82 (patch) | |
tree | f3a5e81d9e3b1d1ca063184d79209d5d51d0ac37 /drivers/hwmon/pmbus | |
parent | ae02e7418ffa2ba5d927869ef9eab4c87549d8e9 (diff) | |
download | blackbird-op-linux-af78fdf4a61827bed7f0fcbba8cc9ae393a3ad82.tar.gz blackbird-op-linux-af78fdf4a61827bed7f0fcbba8cc9ae393a3ad82.zip |
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.c | 2 |
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, if (!s1 && !s2) { ret = !!regval; } else if (!s1 || !s2) { - BUG(); + WARN(1, "Bad boolean descriptor %p: s1=%p, s2=%p\n", b, s1, s2); return 0; } else { long v1, v2; |