[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3388603e9a874c2d893b5fff8949390e@realtek.com>
Date: Fri, 26 Aug 2022 02:44:40 +0000
From: Ping-Ke Shih <pkshih@...ltek.com>
To: Yang Yingliang <yangyingliang@...wei.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-wireless@...r.kernel.org" <linux-wireless@...r.kernel.org>
CC: "tony0620emma@...il.com" <tony0620emma@...il.com>,
"kvalo@...nel.org" <kvalo@...nel.org>,
Bernie Huang <phhuang@...ltek.com>
Subject: RE: [PATCH -next v2] wifi: rtw88: add missing destroy_workqueue() on error path in rtw_core_init()
> -----Original Message-----
> From: Yang Yingliang <yangyingliang@...wei.com>
> Sent: Friday, August 26, 2022 10:38 AM
> To: linux-kernel@...r.kernel.org; netdev@...r.kernel.org; linux-wireless@...r.kernel.org
> Cc: tony0620emma@...il.com; kvalo@...nel.org; Bernie Huang <phhuang@...ltek.com>
> Subject: [PATCH -next v2] wifi: rtw88: add missing destroy_workqueue() on error path in rtw_core_init()
>
> Add the missing destroy_workqueue() before return from rtw_core_init()
> in error path.
>
> Fixes: fe101716c7c9 ("rtw88: replace tx tasklet with work queue")
> Signed-off-by: Yang Yingliang <yangyingliang@...wei.com>
Reviewed-by: Ping-Ke Shih <pkshih@...ltek.com>
Thanks
> ---
> v2:
> Change labe name to 'out'.
> ---
> drivers/net/wireless/realtek/rtw88/main.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/realtek/rtw88/main.c b/drivers/net/wireless/realtek/rtw88/main.c
> index 790dcfed1125..475ce0e3071c 100644
> --- a/drivers/net/wireless/realtek/rtw88/main.c
> +++ b/drivers/net/wireless/realtek/rtw88/main.c
> @@ -2094,7 +2094,7 @@ int rtw_core_init(struct rtw_dev *rtwdev)
> ret = rtw_load_firmware(rtwdev, RTW_NORMAL_FW);
> if (ret) {
> rtw_warn(rtwdev, "no firmware loaded\n");
> - return ret;
> + goto out;
> }
>
> if (chip->wow_fw_name) {
> @@ -2104,11 +2104,15 @@ int rtw_core_init(struct rtw_dev *rtwdev)
> wait_for_completion(&rtwdev->fw.completion);
> if (rtwdev->fw.firmware)
> release_firmware(rtwdev->fw.firmware);
> - return ret;
> + goto out;
> }
> }
>
> return 0;
> +
> +out:
> + destroy_workqueue(rtwdev->tx_wq);
> + return ret;
> }
> EXPORT_SYMBOL(rtw_core_init);
>
> --
> 2.25.1
>
>
> ------Please consider the environment before printing this e-mail.
Powered by blists - more mailing lists