Skip to content

Commit

Permalink
RDMA/cma: Use PTR_RET rather than if (IS_ERR(...)) + PTR_ERR
Browse files Browse the repository at this point in the history
Suggested by scripts/coccinelle/api/ptr_ret.cocci.

Signed-off-by: Roland Dreier <roland@purestorage.com>
  • Loading branch information
Fengguang Wu authored and Roland Dreier committed Jul 27, 2012
1 parent 5dedb9f commit 4e28904
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/infiniband/core/cma.c
Original file line number Diff line number Diff line change
Expand Up @@ -3064,10 +3064,7 @@ static int cma_join_ib_multicast(struct rdma_id_private *id_priv,
id_priv->id.port_num, &rec,
comp_mask, GFP_KERNEL,
cma_ib_mc_handler, mc);
if (IS_ERR(mc->multicast.ib))
return PTR_ERR(mc->multicast.ib);

return 0;
return PTR_RET(mc->multicast.ib);
}

static void iboe_mcast_work_handler(struct work_struct *work)
Expand Down

0 comments on commit 4e28904

Please sign in to comment.