RDMA/mlx5: remove redundant check on err on return expression

Currently all paths that set err and then check it for an error
perform immediate returns, hence err always zero at the end of
the function _mlx5r_umr_zap_mkey.  The return expression
err ? err : nblocks has a redundant check on the err since err
is always zero, so just return nblocks instead.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://patch.msgid.link/20250717112108.4036171-1-colin.i.king@gmail.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
This commit is contained in:
Colin Ian King 2025-07-17 12:21:08 +01:00 committed by Leon Romanovsky
parent 084f35b84f
commit aee80e6ffc

View File

@ -1050,7 +1050,7 @@ static int _mlx5r_umr_zap_mkey(struct mlx5_ib_mr *mr,
}
}
return err ? err : nblocks;
return nblocks;
}
/**