瀏覽代碼

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>
Jiri Pirko 9 年之前
父節點
當前提交
6b20da4d8f
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c

+ 1 - 1
drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c

@@ -215,7 +215,7 @@ static void mlxsw_hwmon_attr_add(struct mlxsw_hwmon *mlxsw_hwmon,
 			 "pwm%u", num + 1);
 		break;
 	default:
-		BUG();
+		WARN_ON(1);
 	}
 
 	mlxsw_hwmon_attr->type_index = type_index;