Skip to content

Commit

Permalink
wifi: rtw88: fix memory leak in rtw_usb_probe()
Browse files Browse the repository at this point in the history
drivers/net/wireless/realtek/rtw88/usb.c:876 rtw_usb_probe()
warn: 'hw' from ieee80211_alloc_hw() not released on lines: 811

Fix this by modifying return to a goto statement.

Signed-off-by: Dongliang Mu <[email protected]>
Reviewed-by: Ping-Ke Shih <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
  • Loading branch information
mudongliang authored and Kalle Valo committed Mar 13, 2023
1 parent 3ab7f9b commit 48181d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/realtek/rtw88/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,7 @@ int rtw_usb_probe(struct usb_interface *intf, const struct usb_device_id *id)

ret = rtw_usb_alloc_rx_bufs(rtwusb);
if (ret)
return ret;
goto err_release_hw;

ret = rtw_core_init(rtwdev);
if (ret)
Expand Down

0 comments on commit 48181d2

Please sign in to comment.