projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ae02e74
)
hwmon: (pmbus) Don't unnecessarily crash the kernel
author
Guenter Roeck
<linux@roeck-us.net>
Fri, 13 Sep 2013 17:31:38 +0000
(10:31 -0700)
committer
Guenter Roeck
<linux@roeck-us.net>
Sun, 13 Oct 2013 23:16:26 +0000
(16:16 -0700)
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>
drivers/hwmon/pmbus/pmbus_core.c
patch
|
blob
|
history
diff --git
a/drivers/hwmon/pmbus/pmbus_core.c
b/drivers/hwmon/pmbus/pmbus_core.c
index 9319fcf142d96656040eabcc0d411699f61f4b06..871cf64d29968751fb087c98867df91247b45306 100644
(file)
--- 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;