Staging: rtl8188eu: core: Remove NULL test before vfree
v2 cover Staging: rtl8188eu: core: Remove NULL test before vfree
The function vfree tests whether the argument is NULL and returns immediately. So NULL test is not needed before vfree. Also remove blank line between function calls.
Changes since v1:
* Remove blank line between function calls in patch 2/2.
* Correct errors in commit messages in both the patches.
* Remove braces around if branch in 1/2.
Bhumika Goyal (2):
Staging: rtl8188eu: core: Remove NULL test before vfree
Staging: rtl8188eu: core: Remove NULL test before vfree
drivers/staging/rtl8188eu/core/rtw_mlme.c | 6 ++---- drivers/staging/rtl8188eu/core/rtw_xmit.c | 7 ++----- 2 files changed, 4 insertions(+), 9 deletions(-)
Signature · 1 line
1.9.1
PATCH v2 1/2 Staging: rtl8188eu: core: Remove NULL test before vfree
The function vfree tests whether the argument is NULL and returns immediately. So NULL test before vfree is not needed. Also remove braces around if branch as they are no longer needed.
---
Changes since v1:
*Correct errors in commit message.
*Remove braces around if branch.
drivers/staging/rtl8188eu/core/rtw_mlme.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/staging/rtl8188eu/core/rtw_mlme.c +2 -4
@@ -122,10 +122,8 @@ void rtw_free_mlme_priv(struct mlme_priv *pmlmepriv) {rtw_free_mlme_priv_ie_data (pmlmepriv); -if (pmlmepriv) { -if (pmlmepriv->free_bss_buf) -vfree (pmlmepriv->free_bss_buf); - } +if (pmlmepriv) +vfree (pmlmepriv->free_bss_buf); }struct wlan_network *_rtw_alloc_network (struct mlme_priv *pmlmepriv)
Signature · 1 line
1.9.1
PATCH v2 2/2 Staging: rtl8188eu: core: Remove NULL test before vfree
In reply to Bhumika GoyalThe function vfree tests whether the argument is NULL and returns immediately. So NULL test is not needed before vfree. Also remove blank line between function calls.
---
Changes since v1:
* Remove blank line between function calls.
* Correct errors in commit message.
drivers/staging/rtl8188eu/core/rtw_xmit.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
drivers/staging/rtl8188eu/core/rtw_xmit.c +2 -5
@@ -247,11 +247,8 @@ void _rtw_free_xmit_priv(struct xmit_priv *pxmitpriv) pxmitbuf++; } -if (pxmitpriv->pallocated_frame_buf) -vfree (pxmitpriv->pallocated_frame_buf); - -if (pxmitpriv->pallocated_xmitbuf) -vfree (pxmitpriv->pallocated_xmitbuf); +vfree (pxmitpriv->pallocated_frame_buf); +vfree (pxmitpriv->pallocated_xmitbuf);/* free xmit extension buff */ pxmitbuf = (struct xmit_buf *)pxmitpriv->pxmit_extbuf;
Signature · 1 line
1.9.1
Greg KH
maintainerQuoted 9 lines · Bhumika Goyal
The function vfree tests whether the argument is NULL and returns immediately. So NULL test before vfree is not needed. Also remove braces around if branch as they are no longer needed.
Signed-off-by Bhumika Goyal <[email protected]>---
Changes since v1:
*Correct errors in commit message.
*Remove braces around if branch.
You sent 2 patches with identical subject lines, I can't take that :(
Please add the filename to the subject to make it more obvious, and unique.
thanks,
greg k-h