[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ec429deb-104a-1b63-1acf-dd69d486b1c6@gmail.com>
Date: Fri, 11 Mar 2022 22:13:43 +0300
From: Pavel Skripkin <paskripkin@...il.com>
To: Haowen Bai <baihaowen@...zu.com>, Larry.Finger@...inger.net,
phil@...lpotter.co.uk, gregkh@...uxfoundation.org
Cc: linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: r8188eu: simplify unnecessary NULL check
Hi Haowen,
On 3/11/22 13:33, Haowen Bai wrote:
> remove the optimisation of NULL checking it inline, kfree/rtw_free_netdev
> will take care if that would ever be the case.
>
> Signed-off-by: Haowen Bai <baihaowen@...zu.com>
> ---
> drivers/staging/r8188eu/os_dep/usb_intf.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/r8188eu/os_dep/usb_intf.c b/drivers/staging/r8188eu/os_dep/usb_intf.c
> index 91792df..8d1ac48 100644
> --- a/drivers/staging/r8188eu/os_dep/usb_intf.c
> +++ b/drivers/staging/r8188eu/os_dep/usb_intf.c
> @@ -425,10 +425,8 @@ static struct adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj,
> rtw_handle_dualmac(padapter, 0);
> free_adapter:
> if (status != _SUCCESS) {
> - if (pnetdev)
> - rtw_free_netdev(pnetdev);
> - else if (padapter)
> - vfree(padapter);
> + rtw_free_netdev(pnetdev);
> + vfree(padapter);
> padapter = NULL;
> }
> exit:
I don't see such code on staging-testing branch.
All error handling code was refactored in commit 13456b9. Please, always
base your code on top of newest branch but not upstream one
With regards,
Pavel Skripkin
Powered by blists - more mailing lists