From: Leon Romanovsky Date: Thu, 29 Nov 2018 10:25:29 +0000 (+0200) Subject: RDMA/mlx5: Initialize return variable in case pagefault was skipped X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=7bca603a69c0c239654a8f0bcb99e1a60b30040c;p=openwrt%2Fstaging%2Fblogic.git 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 Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe --- 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; }