summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/oki-semi
diff options
context:
space:
mode:
authorVeaceslav Falico <vfalico@redhat.com>2013-04-16 07:28:12 +0200
committerDavid S. Miller <davem@davemloft.net>2013-04-16 22:43:35 +0200
commit474f315d7e14be3161d207b3791113f6e6ddb82d (patch)
tree70f08570ba9e957bbb870a36221872fd86ec964f /drivers/net/ethernet/oki-semi
parentvxlan: Allow setting destination to unicast address. (diff)
downloadlinux-474f315d7e14be3161d207b3791113f6e6ddb82d.tar.xz
linux-474f315d7e14be3161d207b3791113f6e6ddb82d.zip
pch_gbe: minor: report the actual error on MTU change
If we can't _up() after changing the MTU, report the actual error instead of -ENOMEM. It can be really misleading cause pch_gbe is usually used in scenarios where the memory amount is really small, and thus hiding the real cause. Signed-off-by: Veaceslav Falico <vfalico@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/oki-semi')
-rw-r--r--drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
index 60eb890800ec..0c1c65a9ce5e 100644
--- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
+++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
@@ -2263,7 +2263,7 @@ static int pch_gbe_change_mtu(struct net_device *netdev, int new_mtu)
if (err) {
adapter->rx_buffer_len = old_rx_buffer_len;
pch_gbe_up(adapter);
- return -ENOMEM;
+ return err;
} else {
netdev->mtu = new_mtu;
adapter->hw.mac.max_frame_size = max_frame;