mlxsw: fix mlxsw_sp2_nve_vxlan_learning_set() return type
authorDan Carpenter <dan.carpenter@linaro.org>
Thu, 5 Oct 2023 14:00:12 +0000 (17:00 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sun, 8 Oct 2023 12:51:39 +0000 (13:51 +0100)
The mlxsw_sp2_nve_vxlan_learning_set() function is supposed to return
zero on success or negative error codes.  So it needs to be type int
instead of bool.

Fixes: 4ee70efab68d ("mlxsw: spectrum_nve: Add support for VXLAN on Spectrum-2")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_nve_vxlan.c

index bb8eeb8..52c2fe3 100644 (file)
@@ -310,8 +310,8 @@ const struct mlxsw_sp_nve_ops mlxsw_sp1_nve_vxlan_ops = {
        .fdb_clear_offload = mlxsw_sp_nve_vxlan_clear_offload,
 };
 
-static bool mlxsw_sp2_nve_vxlan_learning_set(struct mlxsw_sp *mlxsw_sp,
-                                            bool learning_en)
+static int mlxsw_sp2_nve_vxlan_learning_set(struct mlxsw_sp *mlxsw_sp,
+                                           bool learning_en)
 {
        char tnpc_pl[MLXSW_REG_TNPC_LEN];