mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 10:33:41 +02:00
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:
parent
084f35b84f
commit
aee80e6ffc
|
|
@ -1050,7 +1050,7 @@ static int _mlx5r_umr_zap_mkey(struct mlx5_ib_mr *mr,
|
|||
}
|
||||
}
|
||||
|
||||
return err ? err : nblocks;
|
||||
return nblocks;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user