Pārlūkot izejas kodu

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>
Marek Vasut 7 gadi atpakaļ
vecāks
revīzija
60279b5757
1 mainītis faili ar 1 papildinājumiem un 4 dzēšanām
  1. 1 4
      drivers/net/sh_eth.c

+ 1 - 4
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 = &eth->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)