Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a5898e97 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Saeed Mahameed
Browse files

net/mlx5: Vport, Use 'kvfree()' for memory allocated by 'kvzalloc()'



When 'kvzalloc()' is used to allocate memory, 'kvfree()' must be used to
free it.

Fixes: 9efa7525 ("net/mlx5_core: Introduce access functions to query vport RoCE fields")
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
parent a8408f4e
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -511,7 +511,7 @@ int mlx5_query_nic_vport_system_image_guid(struct mlx5_core_dev *mdev,
	*system_image_guid = MLX5_GET64(query_nic_vport_context_out, out,
					nic_vport_context.system_image_guid);

	kfree(out);
	kvfree(out);

	return 0;
}
@@ -531,7 +531,7 @@ int mlx5_query_nic_vport_node_guid(struct mlx5_core_dev *mdev, u64 *node_guid)
	*node_guid = MLX5_GET64(query_nic_vport_context_out, out,
				nic_vport_context.node_guid);

	kfree(out);
	kvfree(out);

	return 0;
}
@@ -587,7 +587,7 @@ int mlx5_query_nic_vport_qkey_viol_cntr(struct mlx5_core_dev *mdev,
	*qkey_viol_cntr = MLX5_GET(query_nic_vport_context_out, out,
				   nic_vport_context.qkey_violation_counter);

	kfree(out);
	kvfree(out);

	return 0;
}