Skip to content

Commit

Permalink
net/rds: Use PTR_ERR instead of IS_ERR for rdsdebug()
Browse files Browse the repository at this point in the history
If 'local_odp_mr->r_trans_private' is a error code,
it is better to print the error code than to print
the value of IS_ERR().

Signed-off-by: Li Qiong <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Li Qiong authored and davem330 committed Aug 1, 2022
1 parent 9e98f8c commit 5121db6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/rds/rdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@ int rds_cmsg_rdma_args(struct rds_sock *rs, struct rds_message *rm,
NULL, 0, rs, &local_odp_mr->r_key, NULL,
iov->addr, iov->bytes, ODP_VIRTUAL);
if (IS_ERR(local_odp_mr->r_trans_private)) {
ret = IS_ERR(local_odp_mr->r_trans_private);
ret = PTR_ERR(local_odp_mr->r_trans_private);
rdsdebug("get_mr ret %d %p\"", ret,
local_odp_mr->r_trans_private);
kfree(local_odp_mr);
Expand Down

0 comments on commit 5121db6

Please sign in to comment.