From: Christophe JAILLET Date: Sun, 13 Nov 2022 15:42:21 +0000 (+0100) Subject: wifi: rtw89: Fix some error handling path in rtw89_wow_enable() X-Git-Tag: v6.6.17~5932^2~181^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=61ec34dee266f1cea092986d861a2cb136571199;p=platform%2Fkernel%2Flinux-rpi.git wifi: rtw89: Fix some error handling path in rtw89_wow_enable() 'ret' is not updated after several function calls in rtw89_wow_enable(). This prevent error handling from working. Add the missing assignments. Fixes: 19e28c7fcc74 ("wifi: rtw89: add WoWLAN function support") Signed-off-by: Christophe JAILLET Acked-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/32320176eeff1c635baeea25ef0e87d116859e65.1668354083.git.christophe.jaillet@wanadoo.fr --- diff --git a/drivers/net/wireless/realtek/rtw89/wow.c b/drivers/net/wireless/realtek/rtw89/wow.c index 7de4dd0..b2b826b 100644 --- a/drivers/net/wireless/realtek/rtw89/wow.c +++ b/drivers/net/wireless/realtek/rtw89/wow.c @@ -744,13 +744,13 @@ static int rtw89_wow_enable(struct rtw89_dev *rtwdev) goto out; } - rtw89_wow_swap_fw(rtwdev, true); + ret = rtw89_wow_swap_fw(rtwdev, true); if (ret) { rtw89_err(rtwdev, "wow: failed to swap to wow fw\n"); goto out; } - rtw89_wow_fw_start(rtwdev); + ret = rtw89_wow_fw_start(rtwdev); if (ret) { rtw89_err(rtwdev, "wow: failed to let wow fw start\n"); goto out; @@ -758,7 +758,7 @@ static int rtw89_wow_enable(struct rtw89_dev *rtwdev) rtw89_wow_enter_lps(rtwdev); - rtw89_wow_enable_trx_post(rtwdev); + ret = rtw89_wow_enable_trx_post(rtwdev); if (ret) { rtw89_err(rtwdev, "wow: failed to enable trx_post\n"); goto out;