[PATCH v4 0/2] clean up error handling

Omer El Idrissi posted 2 patches 1 week ago
drivers/staging/rtl8723bs/os_dep/os_intfs.c  |  8 +++----
drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 25 ++++++++------------
2 files changed, 14 insertions(+), 19 deletions(-)
[PATCH v4 0/2] clean up error handling
Posted by Omer El Idrissi 1 week ago
This series lets sdio_init() propagate standard kernel error codes 
instead of returning _SUCCESS/_FAIL.  There are two callers for this
function.  rtw_resume_process_normal() already returns negative values 
but the caller doesn't check for errors so changing this doesn't
affect anything.  sdio_dvobj_init() returns NULL on
error so leave that as-is.

Signed-off-by: Omer El Idrissi <omer.e.idrissi@gmail.com>
---
v4:
- Squash commits 2, 3, and 4 into one commit

v3:
- Add one commit that lets sdio_dvobj_init() use more readable error
  handling
- Add v3 and v2 tags

v2:
- Add one commit that lets rtw_resume_process_normal cleanly check
  errors and return errno instead of using vendor-defined check

v1:
- Use direct returns in sdio_dvobj_init()
- Cleanup return in sdio_init()

Omer El Idrissi (2):
  staging: rtl8723bs: use direct returns in sdio_dvobj_init()
  staging: rtl8723bs: cleanup return in sdio_init()

 drivers/staging/rtl8723bs/os_dep/os_intfs.c  |  8 +++----
 drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 25 ++++++++------------
 2 files changed, 14 insertions(+), 19 deletions(-)

-- 
2.51.0
Re: [PATCH v4 0/2] clean up error handling
Posted by Dan Carpenter 1 week ago
On Thu, Mar 26, 2026 at 10:36:05AM +0100, Omer El Idrissi wrote:
> This series lets sdio_init() propagate standard kernel error codes 
> instead of returning _SUCCESS/_FAIL.  There are two callers for this
> function.  rtw_resume_process_normal() already returns negative values 
> but the caller doesn't check for errors so changing this doesn't
> affect anything.  sdio_dvobj_init() returns NULL on
> error so leave that as-is.
> 
> Signed-off-by: Omer El Idrissi <omer.e.idrissi@gmail.com>
> ---

Great!  Thanks.

Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>

regards,
dan carpenter