summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLeon Romanovsky <leonro@mellanox.com>2018-11-29 12:25:29 +0200
committerJason Gunthorpe <jgg@mellanox.com>2018-11-29 15:16:45 -0700
commit7bca603a69c0c239654a8f0bcb99e1a60b30040c (patch)
treea7b5b89bf49442ccb6cd1316f4bb910dfd462bc8 /drivers
parent75b7b86bdb0df37e08e44b6c1f99010967f81944 (diff)
RDMA/mlx5: Initialize return variable in case pagefault was skipped
Pagefaults occurred in non-ODP MR are completely valid events, so initialize return variable to 0. Fixes: 4d5422a309de ("IB/mlx5: Skip non-ODP MR when handling a page fault") Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/infiniband/hw/mlx5/odp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mlx5/odp.c b/drivers/infiniband/hw/mlx5/odp.c
index b711a0f3aa35..2cc3d69ab6f6 100644
--- a/drivers/infiniband/hw/mlx5/odp.c
+++ b/drivers/infiniband/hw/mlx5/odp.c
@@ -679,6 +679,7 @@ next_mr:
key);
if (bytes_mapped)
*bytes_mapped += bcnt;
+ ret = 0;
goto srcu_unlock;
}