Patchwork [U-Boot,05/14] net: gem: Simplify return path in zynq_gem_recv

login
register
mail settings
Submitter Michal Simek
Date April 22, 2013, 2:52 p.m.
Message ID <e4987414529fb022c974a5f57ca35eda4677b5de.1366641836.git.michal.simek@xilinx.com>
Download mbox | patch
Permalink /patch/238552/
State Changes Requested
Delegated to: Tom Rini
Headers show

Comments

Michal Simek - April 22, 2013, 2:52 p.m.
Remove one return from the code.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---
 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)