netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] pch_gbe: minor: report the actual error on MTU change
@ 2013-04-16 15:28 Veaceslav Falico
  2013-04-16 20:39 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Veaceslav Falico @ 2013-04-16 15:28 UTC (permalink / raw)
  To: netdev; +Cc: vfalico, tshimizu818, richardcochran, andy.cress

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>
---
 .../net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c   |    2 +-
 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 60eb890..0c1c65a 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;
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-04-16 20:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-16 15:28 [PATCH net-next] pch_gbe: minor: report the actual error on MTU change Veaceslav Falico
2013-04-16 20:39 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).