Commit a470ad21 authored by Larry Finger's avatar Larry Finger Committed by Greg Kroah-Hartman

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: default avatarLarry 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: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c353af83
...@@ -382,13 +382,7 @@ static void deinit_priv(struct rtl_halmac *halmac) ...@@ -382,13 +382,7 @@ static void deinit_priv(struct rtl_halmac *halmac)
indicator = halmac->indicator; indicator = halmac->indicator;
halmac->indicator = NULL; halmac->indicator = NULL;
if (indicator) { kfree(indicator);
u32 count, size;
count = HALMAC_FEATURE_ALL + 1;
size = sizeof(*indicator) * count;
kfree((u8 *)indicator);
}
} }
int rtl_halmac_init_adapter(struct rtl_priv *rtlpriv) int rtl_halmac_init_adapter(struct rtl_priv *rtlpriv)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment