Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6cb3d05f authored by Julia Lawall's avatar Julia Lawall Committed by Greg Kroah-Hartman
Browse files

staging: rtl8723bs: core: rtw_cmd: drop unneeded null tests



kfree returns immediately on NULL so the tests are not needed.

Generated by: scripts/coccinelle/free/ifnullfree.cocci

CC: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarJulia Lawall <julia.lawall@lip6.fr>
Signed-off-by: default avatarFengguang Wu <fengguang.wu@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f951e88b
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -248,10 +248,8 @@ void _rtw_free_evt_priv(struct evt_priv *pevtpriv)
void _rtw_free_cmd_priv(struct	cmd_priv *pcmdpriv)
{
	if (pcmdpriv) {
		if (pcmdpriv->cmd_allocated_buf)
		kfree(pcmdpriv->cmd_allocated_buf);

		if (pcmdpriv->rsp_allocated_buf)
		kfree(pcmdpriv->rsp_allocated_buf);

		mutex_destroy(&pcmdpriv->sctx_mutex);