diff options
author | Marek Vasut <marek.vasut+renesas@gmail.com> | 2018-02-17 00:47:38 +0100 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2018-02-18 11:20:18 +0100 |
commit | 60279b5757990665386799ccf681d420de295404 (patch) | |
tree | 1282ce51f48c3157c01208b72c23bf63de5d199d /drivers/net | |
parent | 3c5a7b75479bb476bb4ed298537ad48a2a23b79d (diff) | |
download | u-boot-60279b5757990665386799ccf681d420de295404.tar.gz u-boot-60279b5757990665386799ccf681d420de295404.tar.bz2 u-boot-60279b5757990665386799ccf681d420de295404.zip |
net: sh_eth: Return directly from sh_eth_recv_start
Drop the len variable, it's useless.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/sh_eth.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c index a7d26a2a40..6863aecef9 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) |