]> git.baikalelectronics.ru Git - kernel.git/commit
wifi: rtw88: mac: Return the original error from rtw_mac_power_switch()
authorMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Sun, 26 Feb 2023 22:10:04 +0000 (23:10 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 May 2023 09:35:41 +0000 (11:35 +0200)
commit80ba657512f89ea31d1e9572f8d174a824f95f99
treecec7f11c0442dde66a62c416200249646e1359bc
parent3b432c75d86ffc35a92c1d94928da588d5f25788
wifi: rtw88: mac: Return the original error from rtw_mac_power_switch()

[ Upstream commit 15c8e267dfa62f207ee1db666c822324e3362b84 ]

rtw_mac_power_switch() calls rtw_pwr_seq_parser() which can return
-EINVAL, -EBUSY or 0. Propagate the original error code instead of
unconditionally returning -EINVAL in case of an error.

Fixes: 6e4bd67d96b4 ("rtw88: new Realtek 802.11ac driver")
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230226221004.138331-3-martin.blumenstingl@googlemail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/realtek/rtw88/mac.c