]> git.ipfire.org Git - thirdparty/linux.git/commit
RDMA/mlx5: remove redundant check on err on return expression
authorColin Ian King <colin.i.king@gmail.com>
Thu, 17 Jul 2025 11:21:08 +0000 (12:21 +0100)
committerLeon Romanovsky <leon@kernel.org>
Thu, 17 Jul 2025 12:19:19 +0000 (08:19 -0400)
commitaee80e6ffc5878a90ca5c16760b2c4f3f3d7343f
tree6a4959b056487cdacb59fe6514858b819bf3fa62
parent084f35b84f57e059b542ea44240a51b294a096a1
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>
drivers/infiniband/hw/mlx5/umr.c