Re: [PATCH 12/12] staging: r8188eu: check the return of kzalloc()

From: xkernel.wang
Date: Tue May 03 2022 - 04:22:58 EST


On Tuesday, May 3, 2022 3:09 PM +0800, joe@xxxxxxxxxxx wrote:
> It'd be better to use the typical error returns

Hi Joe,

Thank you for your suggestion. The typical error returns will make these
codes unified with the code in other places.
But now we can not directly do that in this patch, otherwise, the original
functionality will be affected:

Apart from the returns of the error paths in _rtw_init_xmit_priv itself,
the functions on its call chain such as rtw_init_drv_sw() in
staging/r8188eu/os_dep/os_intfs.c are also sensitive to _SUCCESS or _FAIL.
If we want to unify all of them, there are a lot of changes need to do
which I think is at least beyond the purpose of this patch.

So I just keeps the form of error returns consistent with the original
logic.

Regards,
Xiaoke Wang