net/mlx5: Allocate enough space for the FDB sub-namespaces
[muen/linux.git] / drivers / net / ethernet / mellanox / mlx5 / core / fs_core.c
index 67ba4c975d814a6705a4431c0cf2f4861ee7ae44..9d73eb955f75e0c4e19047aae6cf52d9457e6c64 100644 (file)
@@ -2470,7 +2470,7 @@ static int init_fdb_root_ns(struct mlx5_flow_steering *steering)
                return -ENOMEM;
 
        steering->fdb_sub_ns = kzalloc(sizeof(steering->fdb_sub_ns) *
-                                      FDB_MAX_CHAIN + 1, GFP_KERNEL);
+                                      (FDB_MAX_CHAIN + 1), GFP_KERNEL);
        if (!steering->fdb_sub_ns)
                return -ENOMEM;