The labels were out of order, so it either could result in an Oops or a
leak.
Fixes: 48935bbb7ae8 ("net/mlx5e: IPoIB, Add netdevice profile skeleton")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
*/
return netdev;
-free_mdev_resources:
- mlx5e_destroy_mdev_resources(mdev);
err_free_netdev:
free_netdev(netdev);
+free_mdev_resources:
+ mlx5e_destroy_mdev_resources(mdev);
+
return NULL;
}
EXPORT_SYMBOL(mlx5_rdma_netdev_alloc);