]> git.baikalelectronics.ru Git - kernel.git/commit
vdpa/mlx5: Fix possible uninitialized return value
authorEli Cohen <elic@nvidia.com>
Thu, 11 Aug 2022 13:40:10 +0000 (16:40 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 11 Aug 2022 14:00:36 +0000 (10:00 -0400)
commit936f15a8b2836cd2627da9f98d273dfe3c27b33d
tree379db2156a85d2bc57500fca8e5ed6260d7b0c23
parent22e0bc34ba82ead0da0283894eb0239080a2e1c8
vdpa/mlx5: Fix possible uninitialized return value

Initialize err local variable to return -EAGAIN if the asid cannot be
found thus avoiding returning uninitialized value.

Fixes: c72a0fdf4d1e ("vdpa/mlx5: Support different address spaces for control and data")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Eli Cohen <elic@nvidia.com>
Message-Id: <20220811134010.952291-1-elic@nvidia.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/vdpa/mlx5/net/mlx5_vnet.c