]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
wifi: rtw89: usb: fix leak in rtw89_usb_write_port()
authorFedor Pchelkin <pchelkin@ispras.ru>
Tue, 4 Nov 2025 13:57:09 +0000 (16:57 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Dec 2025 13:02:51 +0000 (14:02 +0100)
commit87cc6fe79c3e5a4760c396fb715dc8b137ffe149
tree73af5a7293c47a2422728b774237eb63a3a67111
parentbcf44fe565bf1bf098fecd338a625db3180ec531
wifi: rtw89: usb: fix leak in rtw89_usb_write_port()

[ Upstream commit 7543818e97d5d54b3b2f75f1c4dedee298d7d914 ]

When there is an attempt to write data and RTW89_FLAG_UNPLUGGED is set,
this means device is disconnected and no urb is submitted.  Return
appropriate error code to the caller to properly free the allocated
resources.

Found by Linux Verification Center (linuxtesting.org).

Fixes: 2135c28be6a8 ("wifi: rtw89: Add usb.{c,h}")
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Fedor Pchelkin <pchelkin@ispras.ru>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20251104135720.321110-3-pchelkin@ispras.ru
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/realtek/rtw89/usb.c