Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f7534f45 authored by Zhu Yanjun's avatar Zhu Yanjun Committed by Doug Ledford
Browse files

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: default avatarGuanglei Li <guanglei.li@oracle.com>
Signed-off-by: default avatarZhu Yanjun <yanjun.zhu@oracle.com>
Reviewed-by: default avatarYuval Shaia <yuval.shaia@oracle.com>
Reviewed-by: default avatarLeon Romanovsky <leonro@mellanox.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 506f71d1
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -593,7 +593,7 @@ void ipoib_pkey_open(struct ipoib_dev_priv *priv);
void ipoib_drain_cq(struct net_device *dev);
void ipoib_drain_cq(struct net_device *dev);


void ipoib_set_ethtool_ops(struct net_device *dev);
void ipoib_set_ethtool_ops(struct net_device *dev);
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);


#define IPOIB_FLAGS_RC		0x80
#define IPOIB_FLAGS_RC		0x80
#define IPOIB_FLAGS_UC		0x40
#define IPOIB_FLAGS_UC		0x40
+2 −6
Original line number Original line Diff line number Diff line
@@ -1995,7 +1995,7 @@ int ipoib_add_pkey_attr(struct net_device *dev)
	return device_create_file(&dev->dev, &dev_attr_pkey);
	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;
	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;
		priv->dev->features |= priv->dev->hw_features;
	}
	}

	return 0;
}
}


static struct net_device *ipoib_add_port(const char *format,
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;
		goto device_init_failed;
	}
	}


	result = ipoib_set_dev_features(priv, hca);
	ipoib_set_dev_features(priv, hca);
	if (result)
		goto device_init_failed;


	/*
	/*
	 * Set the full membership bit, so that we join the right
	 * Set the full membership bit, so that we join the right
+1 −3
Original line number Original line Diff line number Diff line
@@ -61,9 +61,7 @@ int __ipoib_vlan_add(struct ipoib_dev_priv *ppriv, struct ipoib_dev_priv *priv,
	priv->parent = ppriv->dev;
	priv->parent = ppriv->dev;
	set_bit(IPOIB_FLAG_SUBINTERFACE, &priv->flags);
	set_bit(IPOIB_FLAG_SUBINTERFACE, &priv->flags);


	result = ipoib_set_dev_features(priv, ppriv->ca);
	ipoib_set_dev_features(priv, ppriv->ca);
	if (result)
		goto err;


	priv->pkey = pkey;
	priv->pkey = pkey;