Skip to content

Commit 7bca603

Browse files
Leon Romanovskyjgunthorpe
authored andcommitted
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: 4d5422a ("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>
1 parent 75b7b86 commit 7bca603

File tree

1 file changed

+1
-0
lines changed
  • drivers/infiniband/hw/mlx5

1 file changed

+1
-0
lines changed

drivers/infiniband/hw/mlx5/odp.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -679,6 +679,7 @@ static int pagefault_single_data_segment(struct mlx5_ib_dev *dev,
679679
key);
680680
if (bytes_mapped)
681681
*bytes_mapped += bcnt;
682+
ret = 0;
682683
goto srcu_unlock;
683684
}
684685

0 commit comments

Comments
 (0)