vdpa/mlx5: Restore cur_num_vqs in case of failure in change_num_qps()
authorEli Cohen <elic@nvidia.com>
Wed, 5 Jan 2022 11:46:41 +0000 (13:46 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 10:05:36 +0000 (11:05 +0100)
commit63bc14d6e2615e9f89f7110c97ad6e6433379007
tree502bef8a4c0f6c1c1d563a21ffe139f563e0b3c6
parent786e608e97b91227b069517fac6118dfc1ad2c95
vdpa/mlx5: Restore cur_num_vqs in case of failure in change_num_qps()

commit 37e07e705888e4c3502f204e9c6785c9c2d6d86a upstream.

Restore ndev->cur_num_vqs to the original value in case change_num_qps()
fails.

Fixes: 52893733f2c5 ("vdpa/mlx5: Add multiqueue support")
Reviewed-by: Si-Wei Liu<si-wei.liu@oracle.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Eli Cohen <elic@nvidia.com>
Link: https://lore.kernel.org/r/20220105114646.577224-10-elic@nvidia.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/vdpa/mlx5/net/mlx5_vnet.c