summaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
authorLarry Finger <Larry.Finger@lwfinger.net>2017-08-30 14:43:13 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-08-31 18:29:33 +0200
commita470ad21f980c1b642bf17eeda8e584b5566b701 (patch)
treedd5001fa1aefac79051a4f3001fff180226e1c5e /drivers/staging
parentc353af8343c37386161167ae7fbe6747f6be580c (diff)
staging: r8822be: Simplify deinit_priv()
Now that the extraneous debugging code is removed, routine deinit_priv() clearly contains code that serves no useful purpose. A null test before a call to kfree() and a spurious cast are also removed. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Ping-Ke Shih <pkshih@realtek.com> Cc: Yan-Hsuan Chuang <yhchuang@realtek.com> Cc: Birming Chiu <birming@realtek.com> Cc: Shaofu <shaofu@realtek.com> Cc: Steven Ting <steventing@realtek.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/rtlwifi/halmac/rtl_halmac.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/staging/rtlwifi/halmac/rtl_halmac.c b/drivers/staging/rtlwifi/halmac/rtl_halmac.c
index 2b1c5fae64ef..6448a8bfc14b 100644
--- a/drivers/staging/rtlwifi/halmac/rtl_halmac.c
+++ b/drivers/staging/rtlwifi/halmac/rtl_halmac.c
@@ -382,13 +382,7 @@ static void deinit_priv(struct rtl_halmac *halmac)
indicator = halmac->indicator;
halmac->indicator = NULL;
- if (indicator) {
- u32 count, size;
-
- count = HALMAC_FEATURE_ALL + 1;
- size = sizeof(*indicator) * count;
- kfree((u8 *)indicator);
- }
+ kfree(indicator);
}
int rtl_halmac_init_adapter(struct rtl_priv *rtlpriv)