IB/IPoIB: Remove 'else' when the 'if' has a return.
authorDasaratharaman Chandramouli <dasaratharaman.chandramouli@intel.com>
Sat, 29 Apr 2017 18:41:14 +0000 (14:41 -0400)
committerDoug Ledford <dledford@redhat.com>
Mon, 1 May 2017 18:32:43 +0000 (14:32 -0400)
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>
drivers/infiniband/ulp/ipoib/ipoib_multicast.c

index 3385869443ecd39314a5b3b7ef7ec5dcb995eb19..21e8514a8847971ca3692bedff992be4e0868936 100644 (file)
@@ -295,17 +295,16 @@ static int ipoib_mcast_join_finish(struct ipoib_mcast *mcast,
                                -PTR_ERR(ah));
                        /* use original error */
                        return PTR_ERR(ah);
-               } else {
-                       spin_lock_irq(&priv->lock);
-                       mcast->ah = ah;
-                       spin_unlock_irq(&priv->lock);
-
-                       ipoib_dbg_mcast(priv, "MGID %pI6 AV %p, LID 0x%04x, SL %d\n",
-                                       mcast->mcmember.mgid.raw,
-                                       mcast->ah->ah,
-                                       be16_to_cpu(mcast->mcmember.mlid),
-                                       mcast->mcmember.sl);
                }
+               spin_lock_irq(&priv->lock);
+               mcast->ah = ah;
+               spin_unlock_irq(&priv->lock);
+
+               ipoib_dbg_mcast(priv, "MGID %pI6 AV %p, LID 0x%04x, SL %d\n",
+                               mcast->mcmember.mgid.raw,
+                               mcast->ah->ah,
+                               be16_to_cpu(mcast->mcmember.mlid),
+                               mcast->mcmember.sl);
        }
 
        /* actually send any queued packets */