Re: [PATCH] [PATCH] staging: rtl8723bs: change error handling to use standard errno
From: Greg KH
Date: Fri Mar 20 2026 - 03:36:47 EST
On Fri, Mar 20, 2026 at 08:29:50AM +0100, Omer El Idrissi wrote:
> Replace non-standard return values with descriptive
> linux kernel error codes in probe path.
> Also replace the variable name 'status' with 'ret'
> to be more consistent with other kernel code
>
> Signed-off-by: Omer El Idrissi <omer.e.idrissi@xxxxxxxxx>
> ---
> drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 30 +++++++++++++-------
> 1 file changed, 19 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
> index d664e254912c..ff0ebcb59c68 100644
> --- a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
> +++ b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
> @@ -345,38 +345,46 @@ static int rtw_drv_init(
> struct sdio_func *func,
> const struct sdio_device_id *id)
> {
> - int status = _FAIL;
> + int ret;
> struct adapter *if1 = NULL;
> struct dvobj_priv *dvobj;
>
> dvobj = sdio_dvobj_init(func);
> - if (!dvobj)
> + if (!dvobj) {
> + ret = -ENOMEM;
why is this an "out of memory" error?
thanks,
greg k-h