From 4e289045286c5f20d7d8f86b18679bad9e9a2003 Mon Sep 17 00:00:00 2001 From: Fengguang Wu Date: Fri, 27 Jul 2012 13:05:18 -0700 Subject: [PATCH] RDMA/cma: Use PTR_RET rather than if (IS_ERR(...)) + PTR_ERR Suggested by scripts/coccinelle/api/ptr_ret.cocci. Signed-off-by: Roland Dreier --- drivers/infiniband/core/cma.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c index 5a335b5447c6..7172559ce0c1 100644 --- a/drivers/infiniband/core/cma.c +++ b/drivers/infiniband/core/cma.c @@ -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) -- GitLab