net/mlx5e: Fix error flow in change profile
authorRoi Dayan <roid@nvidia.com>
Wed, 10 Feb 2021 08:33:13 +0000 (10:33 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 10 Mar 2021 19:01:56 +0000 (11:01 -0800)
commit469549e4778a1e5ac4a7c6659c4b1a75a648bfdf
tree05f7841f022e890ca78ebbab304879ffe1a7f06e
parentf574531a0b77261478408e9c8f70d96dc701a35a
net/mlx5e: Fix error flow in change profile

Move priv memset from init to cleanup to avoid double priv cleanup
that can happen on profile change if also roolback fails.
Add missing cleanup flow in mlx5e_netdev_attach_profile().

Fixes: c4d7eb57687f ("net/mxl5e: Add change profile method")
Signed-off-by: Roi Dayan <roid@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c