提交 e824b3eb 编写于 作者: W Wang Chen 提交者: David S. Miller

skge: Fix skge_set_ring_param() losing error return

The error return is useful to caller, driver shouldn't miss it.
Signed-off-by: NWang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 9ac1353f
......@@ -501,7 +501,7 @@ static int skge_set_ring_param(struct net_device *dev,
struct ethtool_ringparam *p)
{
struct skge_port *skge = netdev_priv(dev);
int err;
int err = 0;
if (p->rx_pending == 0 || p->rx_pending > MAX_RX_RING_SIZE ||
p->tx_pending < TX_LOW_WATER || p->tx_pending > MAX_TX_RING_SIZE)
......@@ -517,7 +517,7 @@ static int skge_set_ring_param(struct net_device *dev,
dev_close(dev);
}
return 0;
return err;
}
static u32 skge_get_msglevel(struct net_device *netdev)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册