]> git.baikalelectronics.ru Git - kernel.git/commitdiff
i40e, xsk: uninitialized variable in i40e_clean_rx_irq_zc()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 16 Sep 2020 14:32:28 +0000 (17:32 +0300)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Tue, 10 Nov 2020 23:03:14 +0000 (15:03 -0800)
The "failure" variable is used without being initialized.  It should be
set to false.

Fixes: 61322ec7f77b ("i40e, xsk: move buffer allocation out of the Rx processing loop")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Björn Töpel <bjorn.topel@intel.com>
Tested-by: George Kuruvinakunnel <george.kuruvinakunnel@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/i40e/i40e_xsk.c

index 6acede0acdca59e8407ddab65e39d94de4659079..567fd67e900efd0b2ef6b38ef7bc789be1dc247c 100644 (file)
@@ -281,8 +281,8 @@ int i40e_clean_rx_irq_zc(struct i40e_ring *rx_ring, int budget)
        unsigned int total_rx_bytes = 0, total_rx_packets = 0;
        u16 cleaned_count = I40E_DESC_UNUSED(rx_ring);
        unsigned int xdp_res, xdp_xmit = 0;
+       bool failure = false;
        struct sk_buff *skb;
-       bool failure;
 
        while (likely(total_rx_packets < (unsigned int)budget)) {
                union i40e_rx_desc *rx_desc;