Patchwork [U-Boot,v2,06/15] net: gem: Simplify return path in zynq_gem_recv

login
register
mail settings
Submitter Michal Simek
Date April 23, 2013, 10:46 a.m.
Message ID <c57ae64c06870e17a3d694e643c6a7f1b7449ea6.1366713845.git.michal.simek@xilinx.com>
Download mbox | patch
Permalink /patch/238868/
State Accepted
Delegated to: Michal Simek
Headers show

Comments

Michal Simek - April 23, 2013, 10:46 a.m.
Remove one return from the code.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---
Changes in v2: None

 drivers/net/zynq_gem.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

--
1.8.2.1

Patch

diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
index 7188b9e..c0da628 100644
--- a/drivers/net/zynq_gem.c
+++ b/drivers/net/zynq_gem.c
@@ -363,11 +363,9 @@  static int zynq_gem_recv(struct eth_device *dev)

 		if ((++priv->rxbd_current) >= RX_BUF)
 			priv->rxbd_current = 0;
-
-		return frame_len;
 	}

-	return 0;
+	return frame_len;
 }

 static void zynq_gem_halt(struct eth_device *dev)