Skip to content

Commit aee80e6

Browse files
ColinIanKingrleon
authored andcommitted
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 <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Leon Romanovsky <[email protected]>
1 parent 084f35b commit aee80e6

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

drivers/infiniband/hw/mlx5/umr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1050,7 +1050,7 @@ static int _mlx5r_umr_zap_mkey(struct mlx5_ib_mr *mr,
10501050
}
10511051
}
10521052

1053-
return err ? err : nblocks;
1053+
return nblocks;
10541054
}
10551055

10561056
/**

0 commit comments

Comments
 (0)