diff options
author | Julia Lawall <julia.lawall@lip6.fr> | 2017-04-08 13:12:27 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-04-09 03:29:29 -0400 |
commit | 6cb3d05f3030deed157c9bbada5c58e7ee0f5172 (patch) | |
tree | db6ccbb32347a5e64b242c5ba91ebf5cd090eefd | |
parent | f951e88bdc1c1f667d9237a52e2e5d76ae16cf54 (diff) |
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: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/rtl8723bs/core/rtw_cmd.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c index 475ed38505af..24ba0533572e 100644 --- a/drivers/staging/rtl8723bs/core/rtw_cmd.c +++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c | |||
@@ -248,11 +248,9 @@ void _rtw_free_evt_priv(struct evt_priv *pevtpriv) | |||
248 | void _rtw_free_cmd_priv(struct cmd_priv *pcmdpriv) | 248 | void _rtw_free_cmd_priv(struct cmd_priv *pcmdpriv) |
249 | { | 249 | { |
250 | if (pcmdpriv) { | 250 | if (pcmdpriv) { |
251 | if (pcmdpriv->cmd_allocated_buf) | 251 | kfree(pcmdpriv->cmd_allocated_buf); |
252 | kfree(pcmdpriv->cmd_allocated_buf); | ||
253 | 252 | ||
254 | if (pcmdpriv->rsp_allocated_buf) | 253 | kfree(pcmdpriv->rsp_allocated_buf); |
255 | kfree(pcmdpriv->rsp_allocated_buf); | ||
256 | 254 | ||
257 | mutex_destroy(&pcmdpriv->sctx_mutex); | 255 | mutex_destroy(&pcmdpriv->sctx_mutex); |
258 | } | 256 | } |