All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: Omer El Idrissi <omer.e.idrissi@gmail.com>
Cc: gregkh@linuxfoundation.org, linux-staging@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/5] staging: rtl8723bs: remove use of vendor-defined status macros
Date: Wed, 1 Apr 2026 11:42:36 +0300	[thread overview]
Message-ID: <aczafAL_oVlP6Z-1@stanley.mountain> (raw)
In-Reply-To: <20260331153255.22764-4-omer.e.idrissi@gmail.com>

On Tue, Mar 31, 2026 at 05:32:52PM +0200, Omer El Idrissi wrote:
> Remove the check for _FAIL macro on two occurrences in rtw_sdio_if1_init
> 
> Signed-off-by: Omer El Idrissi <omer.e.idrissi@gmail.com>
> ---
>  drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
> index 8412331c4949..34ef40a86153 100644
> --- a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
> +++ b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
> @@ -262,7 +262,7 @@ static struct adapter *rtw_sdio_if1_init(struct dvobj_priv *dvobj, const struct
>  	padapter->intf_alloc_irq = &sdio_alloc_irq;
>  	padapter->intf_free_irq = &sdio_free_irq;
>  
> -	if (rtw_init_io_priv(padapter, sdio_set_intf_ops) == _FAIL)
> +	if (rtw_init_io_priv(padapter, sdio_set_intf_ops))

Here _FAIL is zero so this reverses the condition.  You need to change
rtw_init_io_priv() before you change the callers.  And, in fact, you
should change rtw_init_io_priv() at the same time you change the
callers.  Do it in one patch so it's easier to review.

regards,
dan carpenter

>  		goto free_hal_data;
>  
>  	rtw_hal_read_chip_version(padapter);
> @@ -275,7 +275,7 @@ static struct adapter *rtw_sdio_if1_init(struct dvobj_priv *dvobj, const struct
>  	rtw_hal_read_chip_info(padapter);
>  
>  	/* 3 7. init driver common data */
> -	if (rtw_init_drv_sw(padapter) == _FAIL)
> +	if (rtw_init_drv_sw(padapter))
>  		goto free_hal_data;
>  
>  	rtw_wdev_alloc(padapter, dvobj_to_dev(dvobj));


  reply	other threads:[~2026-04-01  8:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-31 15:32 [PATCH 0/5] rtw_sdio_if1_init cleanup and small logic tweak Omer El Idrissi
2026-03-31 15:32 ` [PATCH 1/5] staging: rtl8723bs: use direct returns in rtw_sdio_if1_init Omer El Idrissi
2026-03-31 15:32 ` [PATCH 2/5] staging: rtl8723bs: remove useless line " Omer El Idrissi
2026-03-31 15:32 ` [PATCH 3/5] staging: rtl8723bs: remove use of vendor-defined status macros Omer El Idrissi
2026-04-01  8:42   ` Dan Carpenter [this message]
2026-03-31 15:32 ` [PATCH 4/5] staging: rtl8723bs: replace function with error handling alternative Omer El Idrissi
2026-04-01  8:46   ` Dan Carpenter
2026-03-31 15:32 ` [PATCH 5/5] staging: rtl8723bs: add separate label for freeing rtw_wdev Omer El Idrissi
2026-04-01  8:59   ` Dan Carpenter
2026-04-01  1:39 ` [PATCH 0/5] rtw_sdio_if1_init cleanup and small logic tweak Ethan Tidmore

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aczafAL_oVlP6Z-1@stanley.mountain \
    --to=error27@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=omer.e.idrissi@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.