Skip to content

Commit

Permalink
skge: Fix skge_set_ring_param() losing error return
Browse files Browse the repository at this point in the history
The error return is useful to caller, driver shouldn't miss it.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Wang Chen authored and David S. Miller committed Oct 8, 2008
1 parent 9ac1353 commit e824b3e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/skge.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit e824b3e

Please sign in to comment.