lkml.org 
[lkml]   [2022]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] staging: r8188eu: add check for kzalloc
On Wed, May 18, 2022 at 02:30:24PM +0800, Jiasheng Jiang wrote:
> diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c
> index c2a550e7250e..0b3bcfbf22f7 100644
> --- a/drivers/staging/r8188eu/core/rtw_xmit.c
> +++ b/drivers/staging/r8188eu/core/rtw_xmit.c
> @@ -178,7 +178,10 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter)
>
> pxmitpriv->free_xmit_extbuf_cnt = num_xmit_extbuf;
>
> - rtw_alloc_hwxmits(padapter);
> + res = rtw_alloc_hwxmits(padapter);
> + if (res)
> + goto exit;

Unfortunately this needs to be:

if (res) {
res = _FAIL;
goto exit;
}

Eventually someone will get rid of the _FAIL garbage but for now the
caller expects it.

regards,
dan carpenter

\
 
 \ /
  Last update: 2022-05-18 08:52    [W:2.186 / U:0.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site