Skip to content

Commit cfd5193

Browse files
Dasaratharaman Chandramoulidledford
authored andcommitted
IB/IPoIB: Remove 'else' when the 'if' has a return.
This patch fixes a checkpatch issue related to not having to use an 'else' if the 'if' path returns from the function. Reviewed-by: Ira Weiny <ira.weiny@intel.com> Reviewed-by: Don Hiatt <don.hiatt@intel.com> Reviewed-by: Sean Hefty <sean.hefty@intel.com> Signed-off-by: Dasaratharaman Chandramouli <dasaratharaman.chandramouli@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
1 parent bef4211 commit cfd5193

1 file changed

Lines changed: 9 additions & 10 deletions

File tree

‎drivers/infiniband/ulp/ipoib/ipoib_multicast.c‎

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -295,17 +295,16 @@ static int ipoib_mcast_join_finish(struct ipoib_mcast *mcast,
295295
-PTR_ERR(ah));
296296
/* use original error */
297297
return PTR_ERR(ah);
298-
} else {
299-
spin_lock_irq(&priv->lock);
300-
mcast->ah = ah;
301-
spin_unlock_irq(&priv->lock);
302-
303-
ipoib_dbg_mcast(priv, "MGID %pI6 AV %p, LID 0x%04x, SL %d\n",
304-
mcast->mcmember.mgid.raw,
305-
mcast->ah->ah,
306-
be16_to_cpu(mcast->mcmember.mlid),
307-
mcast->mcmember.sl);
308298
}
299+
spin_lock_irq(&priv->lock);
300+
mcast->ah = ah;
301+
spin_unlock_irq(&priv->lock);
302+
303+
ipoib_dbg_mcast(priv, "MGID %pI6 AV %p, LID 0x%04x, SL %d\n",
304+
mcast->mcmember.mgid.raw,
305+
mcast->ah->ah,
306+
be16_to_cpu(mcast->mcmember.mlid),
307+
mcast->mcmember.sl);
309308
}
310309

311310
/* actually send any queued packets */

0 commit comments

Comments
 (0)