* [PATCH v3] staging: rtl8723bs: remove unnecessary NULL check before vfree
@ 2026-05-28 7:05 Bastien Cossette
2026-05-28 7:25 ` Dan Carpenter
2026-05-28 7:28 ` Greg Kroah-Hartman
0 siblings, 2 replies; 3+ messages in thread
From: Bastien Cossette @ 2026-05-28 7:05 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: Dan Carpenter, linux-staging, Bastien Cossette
The vfree() function handles NULL pointers natively. Cleaning up the
redundant if check simplifies the code and adheres to core kernel
coding styles.
Signed-off-by: Bastien Cossette <bastiencossette29@icloud.com>
---
drivers/staging/rtl8723bs/hal/hal_com.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/hal_com.c b/drivers/staging/rtl8723bs/hal/hal_com.c
index 728a2171fbcb..00c511b38595 100644
--- a/drivers/staging/rtl8723bs/hal/hal_com.c
+++ b/drivers/staging/rtl8723bs/hal/hal_com.c
@@ -23,14 +23,11 @@ u8 rtw_hal_data_init(struct adapter *padapter)
void rtw_hal_data_deinit(struct adapter *padapter)
{
- if (padapter->HalData) {
- vfree(padapter->HalData);
- padapter->HalData = NULL;
- padapter->hal_data_sz = 0;
- }
+ vfree(padapter->HalData);
+ padapter->HalData = NULL;
+ padapter->hal_data_sz = 0;
}
-
void dump_chip_info(struct hal_version chip_version)
{
char buf[128];
--
2.53.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH v3] staging: rtl8723bs: remove unnecessary NULL check before vfree
2026-05-28 7:05 [PATCH v3] staging: rtl8723bs: remove unnecessary NULL check before vfree Bastien Cossette
@ 2026-05-28 7:25 ` Dan Carpenter
2026-05-28 7:28 ` Greg Kroah-Hartman
1 sibling, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2026-05-28 7:25 UTC (permalink / raw)
To: Bastien Cossette; +Cc: Greg Kroah-Hartman, linux-staging
On Thu, May 28, 2026 at 03:05:54AM -0400, Bastien Cossette wrote:
> The vfree() function handles NULL pointers natively. Cleaning up the
> redundant if check simplifies the code and adheres to core kernel
> coding styles.
>
> Signed-off-by: Bastien Cossette <bastiencossette29@icloud.com>
> ---
Please read my review comments to earlier patches.
Please wait a day between resends.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v3] staging: rtl8723bs: remove unnecessary NULL check before vfree
2026-05-28 7:05 [PATCH v3] staging: rtl8723bs: remove unnecessary NULL check before vfree Bastien Cossette
2026-05-28 7:25 ` Dan Carpenter
@ 2026-05-28 7:28 ` Greg Kroah-Hartman
1 sibling, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-28 7:28 UTC (permalink / raw)
To: Bastien Cossette; +Cc: Dan Carpenter, linux-staging
On Thu, May 28, 2026 at 03:05:54AM -0400, Bastien Cossette wrote:
> The vfree() function handles NULL pointers natively. Cleaning up the
> redundant if check simplifies the code and adheres to core kernel
> coding styles.
>
> Signed-off-by: Bastien Cossette <bastiencossette29@icloud.com>
> ---
> drivers/staging/rtl8723bs/hal/hal_com.c | 9 +++------
> 1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/hal/hal_com.c b/drivers/staging/rtl8723bs/hal/hal_com.c
> index 728a2171fbcb..00c511b38595 100644
> --- a/drivers/staging/rtl8723bs/hal/hal_com.c
> +++ b/drivers/staging/rtl8723bs/hal/hal_com.c
> @@ -23,14 +23,11 @@ u8 rtw_hal_data_init(struct adapter *padapter)
>
> void rtw_hal_data_deinit(struct adapter *padapter)
> {
> - if (padapter->HalData) {
> - vfree(padapter->HalData);
> - padapter->HalData = NULL;
> - padapter->hal_data_sz = 0;
> - }
> + vfree(padapter->HalData);
> + padapter->HalData = NULL;
> + padapter->hal_data_sz = 0;
> }
>
> -
> void dump_chip_info(struct hal_version chip_version)
> {
> char buf[128];
> --
> 2.53.0
>
>
Hi,
This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him
a patch that has triggered this response. He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created. Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.
You are receiving this message because of the following common error(s)
as indicated below:
- This looks like a new version of a previously submitted patch, but you
did not list below the --- line any changes from the previous version.
Please read the section entitled "The canonical patch format" in the
kernel file, Documentation/process/submitting-patches.rst for what
needs to be done here to properly describe this.
If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.
thanks,
greg k-h's patch email bot
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-05-28 7:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-28 7:05 [PATCH v3] staging: rtl8723bs: remove unnecessary NULL check before vfree Bastien Cossette
2026-05-28 7:25 ` Dan Carpenter
2026-05-28 7:28 ` Greg Kroah-Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox