aboutsummaryrefslogtreecommitdiff
path: root/drivers/infiniband/ulp/ipoib/ipoib_main.c
diff options
context:
space:
mode:
authorGravatar Zhu Yanjun <yanjun.zhu@oracle.com> 2017-01-05 03:56:08 -0500
committerGravatar Doug Ledford <dledford@redhat.com> 2017-01-24 16:20:37 -0500
commitf7534f45dcbc1a2ecb486b019db0443188e957d6 (patch)
treee9bd287abadd5bf983cf261d6fff6a6eb0e35f22 /drivers/infiniband/ulp/ipoib/ipoib_main.c
parentIB/isert: fix spelling mistake: "teminating" -> "terminating" (diff)
downloadlinux-f7534f45dcbc1a2ecb486b019db0443188e957d6.tar.gz
linux-f7534f45dcbc1a2ecb486b019db0443188e957d6.tar.bz2
linux-f7534f45dcbc1a2ecb486b019db0443188e957d6.zip
IB/ipoib: Remove unnecessary returned value check
In the function ipoib_set_dev_features, the returned value is always 0. As such, it is not necessary to check the returned value. This is not a bug. It is a trivial problem. Reviewed-by: Guanglei Li <guanglei.li@oracle.com> Signed-off-by: Zhu Yanjun <yanjun.zhu@oracle.com> Reviewed-by: Yuval Shaia <yuval.shaia@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.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
index ee32a2a87e2d..c8af6377a288 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -1995,7 +1995,7 @@ int ipoib_add_pkey_attr(struct net_device *dev)
return device_create_file(&dev->dev, &dev_attr_pkey);
}
-int ipoib_set_dev_features(struct ipoib_dev_priv *priv, struct ib_device *hca)
+void ipoib_set_dev_features(struct ipoib_dev_priv *priv, struct ib_device *hca)
{
priv->hca_caps = hca->attrs.device_cap_flags;
@@ -2007,8 +2007,6 @@ int ipoib_set_dev_features(struct ipoib_dev_priv *priv, struct ib_device *hca)
priv->dev->features |= priv->dev->hw_features;
}
-
- return 0;
}
static struct net_device *ipoib_add_port(const char *format,
@@ -2048,9 +2046,7 @@ static struct net_device *ipoib_add_port(const char *format,
goto device_init_failed;
}
- result = ipoib_set_dev_features(priv, hca);
- if (result)
- goto device_init_failed;
+ ipoib_set_dev_features(priv, hca);
/*
* Set the full membership bit, so that we join the right