mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-06 11:54:14 -04:00
lan743x: remove redundant initialization of variable current_head_index
[ Upstream commit bb809a047eb5070e2fc76aa62d111fbbe656c532 ]
The variable current_head_index is being initialized with a value that
is never read and it is being updated later with a new value. Replace
the initialization of -1 with the latter assignment.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stable-dep-of: 2d52e2e38b85 ("net: lan743x: Fix memleak issue when GSO enabled")
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
38c10733ae
commit
a63d220f2a
1 changed files with 1 additions and 2 deletions
|
|
@ -2004,14 +2004,13 @@ static int lan743x_rx_process_packet(struct lan743x_rx *rx)
|
|||
{
|
||||
struct skb_shared_hwtstamps *hwtstamps = NULL;
|
||||
int result = RX_PROCESS_RESULT_NOTHING_TO_DO;
|
||||
int current_head_index = *rx->head_cpu_ptr;
|
||||
struct lan743x_rx_buffer_info *buffer_info;
|
||||
struct lan743x_rx_descriptor *descriptor;
|
||||
int current_head_index = -1;
|
||||
int extension_index = -1;
|
||||
int first_index = -1;
|
||||
int last_index = -1;
|
||||
|
||||
current_head_index = *rx->head_cpu_ptr;
|
||||
if (current_head_index < 0 || current_head_index >= rx->ring_size)
|
||||
goto done;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue