diff options
author | Larry Finger <Larry.Finger@lwfinger.net> | 2017-08-30 15:43:13 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-08-31 12:29:33 -0400 |
commit | a470ad21f980c1b642bf17eeda8e584b5566b701 (patch) | |
tree | dd5001fa1aefac79051a4f3001fff180226e1c5e | |
parent | c353af8343c37386161167ae7fbe6747f6be580c (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>
-rw-r--r-- | drivers/staging/rtlwifi/halmac/rtl_halmac.c | 8 |
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) | |||
382 | 382 | ||
383 | indicator = halmac->indicator; | 383 | indicator = halmac->indicator; |
384 | halmac->indicator = NULL; | 384 | halmac->indicator = NULL; |
385 | if (indicator) { | 385 | kfree(indicator); |
386 | u32 count, size; | ||
387 | |||
388 | count = HALMAC_FEATURE_ALL + 1; | ||
389 | size = sizeof(*indicator) * count; | ||
390 | kfree((u8 *)indicator); | ||
391 | } | ||
392 | } | 386 | } |
393 | 387 | ||
394 | int rtl_halmac_init_adapter(struct rtl_priv *rtlpriv) | 388 | int rtl_halmac_init_adapter(struct rtl_priv *rtlpriv) |