Re: [PATCH] staging: rtl8723bs: replace magic -2 error codes with proper errno
From: Greg KH
Date: Tue Jan 27 2026 - 09:53:52 EST
On Sun, Jan 25, 2026 at 11:12:18PM +0100, Omer El Idrissi wrote:
> In xmit_xmitframes function:
> - Hardware busy condition previously
> returned -2; changed to -EBUSY
> - Transmit buffer allocation failure previously
> returned -2; changed to ENOBUFS
>
> The caller checks both errors and handles retry logic.This improves
> readability and conforms to kernel error-handling
> conventions.
>
> Signed-off-by: Omer El Idrissi <omer.e.idrissi@xxxxxxxxx>
> ---
> drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c b/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
> index abb6fdfe7e1f..d1a427b2ef7f 100644
> --- a/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
> +++ b/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
> @@ -205,7 +205,7 @@ static s32 xmit_xmitframes(struct adapter *padapter, struct xmit_priv *pxmitpriv
> (padapter->mlmepriv.LinkDetectInfo.bHigherBusyTxTraffic)
> ) {
> if ((phwxmit->accnt > 0) && (phwxmit->accnt < 5)) {
> - err = -2;
> + err = -EBUSY; // supposed to return -EBUSY for these conditions???
Why is this comment added? Who is going to answer that?
thanks,
greg k-h