Re: [PATCH] staging: r8188eu: remove unneeded variable
From: Dan Carpenter
Date: Fri Nov 05 2021 - 09:42:33 EST
On Tue, Nov 02, 2021 at 07:32:26AM +0000, cgel.zte@xxxxxxxxx wrote:
> @@ -1611,7 +1610,6 @@ unsigned int OnAtim(struct adapter *padapter, struct recv_frame *precv_frame)
>
> unsigned int on_action_spct(struct adapter *padapter, struct recv_frame *precv_frame)
> {
> - unsigned int ret = _FAIL;
> struct sta_info *psta = NULL;
> struct sta_priv *pstapriv = &padapter->stapriv;
> u8 *pframe = precv_frame->rx_data;
> @@ -1644,7 +1642,7 @@ unsigned int on_action_spct(struct adapter *padapter, struct recv_frame *precv_f
> }
>
> exit:
> - return ret;
> + return _FAIL;
> }
Heh... Let's make it return success on the success path. The other
implementation of this in rtl8723bs/ is wrong too.
No one ever checks, but it's called as a function pointer so we can't
make it void without changing a bunch of other code.
regards,
dan carpenter