RDMA/IPoIB: Fix error code return in ipoib_mcast_join
authorJack Wang <jinpu.wang@ionos.com>
Tue, 21 Nov 2023 13:03:15 +0000 (14:03 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Feb 2024 20:14:26 +0000 (20:14 +0000)
[ Upstream commit 753fff78f430704548f45eda52d6d55371a52c0f ]

Return the error code in case of ib_sa_join_multicast fail.

Signed-off-by: Jack Wang <jinpu.wang@ionos.com>
Link: https://lore.kernel.org/r/20231121130316.126364-2-jinpu.wang@ionos.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/ulp/ipoib/ipoib_multicast.c

index 5b3154503bf498a7b23acd7176d89a6f587c97bd..9e6967a400428e7f3b58e8743c981bcfa8ffc3f2 100644 (file)
@@ -546,6 +546,7 @@ static int ipoib_mcast_join(struct net_device *dev, struct ipoib_mcast *mcast)
                spin_unlock_irq(&priv->lock);
                complete(&mcast->done);
                spin_lock_irq(&priv->lock);
+               return ret;
        }
        return 0;
 }