Skip to content

Commit f9bcfe2

Browse files
Colin Ian Kingdavem330
authored andcommitted
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>
1 parent 5b1ab1a commit f9bcfe2

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎drivers/net/ethernet/microchip/lan743x_main.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2172,9 +2172,8 @@ static int lan743x_rx_napi_poll(struct napi_struct *napi, int weight)
21722172
}
21732173
count = 0;
21742174
while (count < weight) {
2175-
int rx_process_result = -1;
2175+
int rx_process_result = lan743x_rx_process_packet(rx);
21762176

2177-
rx_process_result = lan743x_rx_process_packet(rx);
21782177
if (rx_process_result == RX_PROCESS_RESULT_PACKET_RECEIVED) {
21792178
count++;
21802179
} else if (rx_process_result ==

0 commit comments

Comments
 (0)