rtlwifi: rtl_pci: Fix memory leak when hardware init fails
authorLarry Finger <Larry.Finger@lwfinger.net>
Mon, 26 Aug 2019 22:03:44 +0000 (17:03 -0500)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 3 Sep 2019 13:30:04 +0000 (16:30 +0300)
commit8cc782cd997dc4eb3ac183228d563727884ba874
tree29e1b6d1aaef87b6d70d4e71b36277f65da9815c
parent84d31d3b6234919953855f758401279208ee3b58
rtlwifi: rtl_pci: Fix memory leak when hardware init fails

If the call to hw_init() fails for any of the drivers, the driver will
leak memory that was allocated in BT coexistence setup. Technically, each
of the drivers should have done this free; however placing it in rtl_pci
fixes all the drivers with only a single patch.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/realtek/rtlwifi/pci.c