Linux kernel staging patches
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: Ruziev Miraly <miraly.dev@gmail.com>
Cc: gregkh@linuxfoundation.org, linux-staging@lists.linux.dev
Subject: Re: [PATCH] staging: rtl8723bs: clean up style in core files
Date: Mon, 29 Jun 2026 17:04:17 +0300	[thread overview]
Message-ID: <akJ7YYmGXpwsUDDh@stanley.mountain> (raw)
In-Reply-To: <20260629131831.106937-1-miraly.dev@gmail.com>

On Mon, Jun 29, 2026 at 06:18:31PM +0500, Ruziev Miraly wrote:
> Remove unnecessary braces from a single statement block in rtw_wlan_util.c.
> Additionally, remove an redundant NULL check before kfree() in rtw_xmit.c,
> as kfree() is completely safe to be called with a NULL pointer.
> 
> Signed-off-by: Ruziev Miraly <miraly.dev@gmail.com>
> ---
>  drivers/staging/rtl8723bs/core/rtw_wlan_util.c | 3 +--
>  drivers/staging/rtl8723bs/core/rtw_xmit.c      | 5 +----
>  2 files changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
> index 1d37c2d5b..cc05decd4 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
> @@ -256,9 +256,8 @@ inline void rtw_set_oper_ch(struct adapter *adapter, u8 ch)
>  {
>  	struct dvobj_priv *dvobj = adapter_to_dvobj(adapter);
>  
> -	if (dvobj->oper_channel != ch) {
> +	if (dvobj->oper_channel != ch)
>  		dvobj->on_oper_ch_time = jiffies;
> -	}
>  
>  	dvobj->oper_channel = ch;
>  }
> diff --git a/drivers/staging/rtl8723bs/core/rtw_xmit.c b/drivers/staging/rtl8723bs/core/rtw_xmit.c
> index 444966c0d..3dd08bad3 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_xmit.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_xmit.c
> @@ -1768,10 +1768,7 @@ s32 rtw_free_xmitframe(struct xmit_priv *pxmitpriv, struct xmit_frame *pxmitfram
>  		pxmitframe->pkt = NULL;
>  	}
>  
> -	if (pxmitframe->alloc_addr) {
> -		kfree(pxmitframe->alloc_addr);
> -		goto check_pkt_complete;

Why did you delete this goto?

regards,
dan carpenter

> -	}
> +	kfree(pxmitframe->alloc_addr);
>  


      reply	other threads:[~2026-06-29 14:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-29 13:18 [PATCH] staging: rtl8723bs: clean up style in core files Ruziev Miraly
2026-06-29 14:04 ` Dan Carpenter [this message]

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=akJ7YYmGXpwsUDDh@stanley.mountain \
    --to=error27@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=miraly.dev@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox