Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Colin Ian King and committed by
David S. Miller
f9bcfe21 5b1ab1ae

+1 -2
+1 -2
drivers/net/ethernet/microchip/lan743x_main.c
··· 2172 2172 } 2173 2173 count = 0; 2174 2174 while (count < weight) { 2175 - int rx_process_result = -1; 2175 + int rx_process_result = lan743x_rx_process_packet(rx); 2176 2176 2177 - rx_process_result = lan743x_rx_process_packet(rx); 2178 2177 if (rx_process_result == RX_PROCESS_RESULT_PACKET_RECEIVED) { 2179 2178 count++; 2180 2179 } else if (rx_process_result ==