From: Marek Vasut Date: Sat, 17 Feb 2018 01:04:42 +0100 Subject: [U-Boot] [PATCH 2/4] net: sh_eth: Return directly from sh_eth_recv_start In-Reply-To: <20180217000444.8375-1-marek.vasut+renesas@gmail.com> References: <20180217000444.8375-1-marek.vasut+renesas@gmail.com> Message-ID: <20180217000444.8375-2-marek.vasut+renesas@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Drop the len variable, it's useless. Signed-off-by: Marek Vasut Cc: Nobuhiro Iwamatsu Cc: Joe Hershberger --- drivers/net/sh_eth.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c index b3c0509989..bdb054a36a 100644 --- a/drivers/net/sh_eth.c +++ b/drivers/net/sh_eth.c @@ -120,7 +120,6 @@ err: static int sh_eth_recv_start(struct sh_eth_dev *eth) { - int len = 0; struct sh_eth_info *port_info = ð->port_info[eth->port]; /* Check if the rx descriptor is ready */ @@ -132,9 +131,7 @@ static int sh_eth_recv_start(struct sh_eth_dev *eth) if (port_info->rx_desc_cur->rd0 & RD_RFE) return -EINVAL; - len = port_info->rx_desc_cur->rd1 & 0xffff; - - return len; + return port_info->rx_desc_cur->rd1 & 0xffff; } static void sh_eth_recv_finish(struct sh_eth_dev *eth) -- 2.15.1