mlxsw: core: Change BUG to WARN in hwmon code
authorJiri Pirko <jiri@mellanox.com>
Thu, 3 Dec 2015 09:12:03 +0000 (10:12 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 Dec 2015 20:26:39 +0000 (15:26 -0500)
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>
drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c

index ad8b27418a7f33f0aa9663c0c636ebb876714432..4dad146b41ae5db1f931201fc48aca944f60da67 100644 (file)
@@ -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;