diff options
author | Zhu Yanjun <yanjun.zhu@oracle.com> | 2017-01-18 23:16:06 -0500 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-01-24 16:22:24 -0500 |
commit | 5c37077fd025c0fa3aa3ab2e6b607d653a4fc604 (patch) | |
tree | 205ce7dff6915f6bd880b41289abba0228247a81 /drivers/infiniband/ulp/ipoib/ipoib_main.c | |
parent | 3f9fade5e77da67f618ac766ce1a6ded1679fb1a (diff) | |
download | lwn-5c37077fd025c0fa3aa3ab2e6b607d653a4fc604.tar.gz lwn-5c37077fd025c0fa3aa3ab2e6b607d653a4fc604.zip |
IB/ipoib: Remove the unnecessary error check
The function ipoib_mcast_start_thread/ipoib_ib_dev_up always return zero.
As such, in the function ipoib_open, err_stop will never be reached.
So remove this err_stop and change the return type of the function
ipoib_mcast_start_thread/ipoib_ib_dev_up to void.
Signed-off-by: Zhu Yanjun <yanjun.zhu@oracle.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/ulp/ipoib/ipoib_main.c')
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_main.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index c8af6377a288..e3bfa8a99ad2 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c @@ -126,8 +126,7 @@ int ipoib_open(struct net_device *dev) goto err_disable; } - if (ipoib_ib_dev_up(dev)) - goto err_stop; + ipoib_ib_dev_up(dev); if (!test_bit(IPOIB_FLAG_SUBINTERFACE, &priv->flags)) { struct ipoib_dev_priv *cpriv; @@ -150,9 +149,6 @@ int ipoib_open(struct net_device *dev) return 0; -err_stop: - ipoib_ib_dev_stop(dev); - err_disable: clear_bit(IPOIB_FLAG_ADMIN_UP, &priv->flags); |