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

Commit ed3d2276 authored by Carol Soto's avatar Carol Soto Committed by David S. Miller
Browse files

net/mlx4_core: need to call close fw if alloc icm is called twice



If mlx4_enable_sriov is called by adapter without this
feature MLX4_DEV_CAP_FLAG2_SYS_EQS then during this path the function alloc
icm is called twice without freeing the structures from the first time.

Acked-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: default avatarCarol L Soto <clsoto@linux.vnet.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5114a04e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2976,6 +2976,7 @@ static int mlx4_load_one(struct pci_dev *pdev, int pci_dev_data,
								  existing_vfs,
								  reset_flow);

				mlx4_close_fw(dev);
				mlx4_cmd_cleanup(dev, MLX4_CMD_CLEANUP_ALL);
				dev->flags = dev_flags;
				if (!SRIOV_VALID_STATE(dev->flags)) {