aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2019-09-05 15:01:35 +0100
committerDavid S. Miller <davem@davemloft.net>2019-09-06 16:47:07 +0200
commitf9bcfe214b00c37a6a8e21cab030503fdfd29aca (patch)
treea24416c041b002e4e25174a55c91a1f9c4627391 /drivers
parentMerge branch 'ravb-remove-use-of-undocumented-registers' (diff)
downloadlinux-dev-f9bcfe214b00c37a6a8e21cab030503fdfd29aca.tar.xz
linux-dev-f9bcfe214b00c37a6a8e21cab030503fdfd29aca.zip
lan743x: remove redundant assignment to variable rx_process_result
The variable rx_process_result is being initialized with a value that is never read and is being re-assigned immediately afterwards. The assignment is redundant, so replace it with the return from function lan743x_rx_process_packet. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/microchip/lan743x_main.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/microchip/lan743x_main.c b/drivers/net/ethernet/microchip/lan743x_main.c
index 15a8be6bad27..a43140f7b5eb 100644
--- a/drivers/net/ethernet/microchip/lan743x_main.c
+++ b/drivers/net/ethernet/microchip/lan743x_main.c
@@ -2172,9 +2172,8 @@ static int lan743x_rx_napi_poll(struct napi_struct *napi, int weight)
}
count = 0;
while (count < weight) {
- int rx_process_result = -1;
+ int rx_process_result = lan743x_rx_process_packet(rx);
- rx_process_result = lan743x_rx_process_packet(rx);
if (rx_process_result == RX_PROCESS_RESULT_PACKET_RECEIVED) {
count++;
} else if (rx_process_result ==