Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mlxsw: core: Change BUG to WARN in hwmon code

Better to just warn the user that something really odd is going on and
continue to run.

Suggested-by: Or Gerlitz <gerlitz.or@gmail.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Jiri Pirko and committed by
David S. Miller
6b20da4d ead87637

+1 -1
+1 -1
drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c
··· 215 215 "pwm%u", num + 1); 216 216 break; 217 217 default: 218 - BUG(); 218 + WARN_ON(1); 219 219 } 220 220 221 221 mlxsw_hwmon_attr->type_index = type_index;