Commit 90855921 authored by Amarjargal Gundjalam's avatar Amarjargal Gundjalam Committed by Greg Kroah-Hartman
Browse files

staging: rtl8723bs: cleanup NULL check before vfree



Remove redundant NULL pointer check before vfree() since vfree() does
its own NULL check. Reported by coccinelle.

Signed-off-by: default avatarAmarjargal Gundjalam <amarjargal16@gmail.com>
Link: https://lore.kernel.org/r/20201026141510.GA21791@AJ-T14


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9ab476ba
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -112,7 +112,6 @@ void _rtw_free_mlme_priv(struct mlme_priv *pmlmepriv)
{
	if (pmlmepriv) {
		rtw_free_mlme_priv_ie_data(pmlmepriv);
		if (pmlmepriv->free_bss_buf)
		vfree(pmlmepriv->free_bss_buf);
	}
}
+1 −2
Original line number Diff line number Diff line
@@ -95,7 +95,6 @@ void _rtw_free_recv_priv(struct recv_priv *precvpriv)

	rtw_os_recv_resource_free(precvpriv);

	if (precvpriv->pallocated_frame_buf)
	vfree(precvpriv->pallocated_frame_buf);

	rtw_hal_free_recv_priv(padapter);
+1 −2
Original line number Diff line number Diff line
@@ -177,7 +177,6 @@ u32 _rtw_free_sta_priv(struct sta_priv *pstapriv)

		kfree_sta_priv_lock(pstapriv);

		if (pstapriv->pallocated_stainfo_buf)
		vfree(pstapriv->pallocated_stainfo_buf);

	}
+5 −9
Original line number Diff line number Diff line
@@ -290,10 +290,7 @@ 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);

	/* free xframe_ext queue,  the same count as extbuf  */
@@ -304,7 +301,7 @@ void _rtw_free_xmit_priv(struct xmit_priv *pxmitpriv)
			pxmitframe++;
		}
	}
	if (pxmitpriv->xframe_ext_alloc_addr)

	vfree(pxmitpriv->xframe_ext_alloc_addr);

	/*  free xmit extension buff */
@@ -315,7 +312,6 @@ void _rtw_free_xmit_priv(struct xmit_priv *pxmitpriv)
		pxmitbuf++;
	}

	if (pxmitpriv->pallocated_xmit_extbuf)
	vfree(pxmitpriv->pallocated_xmit_extbuf);

	for (i = 0; i < CMDBUF_MAX; i++) {