]> git.baikalelectronics.ru Git - kernel.git/commit
vdpa/mlx5: Fix uninitialised variable in core/mr.c
authorAlex Dewar <alex.dewar@gmx.co.uk>
Thu, 6 Aug 2020 18:56:15 +0000 (19:56 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 10 Aug 2020 13:01:21 +0000 (09:01 -0400)
commit2445ba57622db0304cf1fea2b67e162a3cd62f31
tree2bbc1c3defa4f67ddcc1718e8c12ec69d7853863
parent174c48be31325ad971531124ada4a9460827ac35
vdpa/mlx5: Fix uninitialised variable in core/mr.c

If the kernel is unable to allocate memory for the variable dmr then
err will be returned without being set. Set err to -ENOMEM in this
case.

Fixes: ffc75a8bcf18 ("vdpa/mlx5: Add shared memory registration code")
Addresses-Coverity: ("Uninitialized variables")
Signed-off-by: Alex Dewar <alex.dewar@gmx.co.uk>
Link: https://lore.kernel.org/r/20200806185625.67344-1-alex.dewar@gmx.co.uk
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Acked-by: Eli Cohen <eli@mellanox.com>
drivers/vdpa/mlx5/core/mr.c