Re: drivers/net/ethernet/chelsio/cxgb4/sge.c:2571 cxgb4_ethofld_send_flowc() warn: missing error code 'ret'

From: Íñigo Huguet
Date: Wed Jul 07 2021 - 04:33:40 EST


On Wed, Jul 7, 2021 at 9:37 AM Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote:
> 0e395b3cb1fb82 Rahul Lakkireddy 2019-11-07 2564 if (tc != FW_SCHED_CLS_NONE) {
> 0e395b3cb1fb82 Rahul Lakkireddy 2019-11-07 2565 if (eosw_txq->state != CXGB4_EO_STATE_CLOSED)
> 52bfcdd87e83d9 Íñigo Huguet 2021-05-05 2566 goto out_free_skb;
> ^^^^^^^^^^^^^^^^^
>
> Are these error paths?
>
> 0e395b3cb1fb82 Rahul Lakkireddy 2019-11-07 2567
> 0e395b3cb1fb82 Rahul Lakkireddy 2019-11-07 2568 next_state = CXGB4_EO_STATE_FLOWC_OPEN_SEND;
> 0e395b3cb1fb82 Rahul Lakkireddy 2019-11-07 2569 } else {
> 0e395b3cb1fb82 Rahul Lakkireddy 2019-11-07 2570 if (eosw_txq->state != CXGB4_EO_STATE_ACTIVE)
> 52bfcdd87e83d9 Íñigo Huguet 2021-05-05 @2571 goto out_free_skb;
>
> Here too
>
> 0e395b3cb1fb82 Rahul Lakkireddy 2019-11-07 2572
> 0e395b3cb1fb82 Rahul Lakkireddy 2019-11-07 2573 next_state = CXGB4_EO_STATE_FLOWC_CLOSE_SEND;
> 0e395b3cb1fb82 Rahul Lakkireddy 2019-11-07 2574 }

I'm not really sure, I just added the skb release in the exit path to
fix a memory leak.

I think it might not be an error path in this case, maybe just no
actions must be done in this specific cases. CCing Raju Rangoju from
Chelsio to see if he can confirm.

--
Íñigo Huguet