summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/realtek/rtw89/cam.c
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2021-10-18 06:31:02 +0300
committerKalle Valo <kvalo@codeaurora.org>2021-10-20 11:49:13 +0300
commita04310edcd00d6014126483a2d8cd95b4786db25 (patch)
treee6d1b1b487712e0c96fc3f7c51420264a7ff1e7e /drivers/net/wireless/realtek/rtw89/cam.c
parent257051a235c17e33782b6e24a4b17f2d7915aaec (diff)
downloadlinux-a04310edcd00d6014126483a2d8cd95b4786db25.tar.xz
rtw89: fix return value check in rtw89_cam_send_sec_key_cmd()
Fix the return value check which testing the wrong variable in rtw89_cam_send_sec_key_cmd(). Reported-by: Hulk Robot <hulkci@huawei.com> Fixes: e3ec7017f6a2 ("rtw89: add Realtek 802.11ax driver") Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Acked-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20211018033102.1813058-1-yangyingliang@huawei.com
Diffstat (limited to 'drivers/net/wireless/realtek/rtw89/cam.c')
-rw-r--r--drivers/net/wireless/realtek/rtw89/cam.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/realtek/rtw89/cam.c b/drivers/net/wireless/realtek/rtw89/cam.c
index c1e8c76c6aca..ad7a8155dbed 100644
--- a/drivers/net/wireless/realtek/rtw89/cam.c
+++ b/drivers/net/wireless/realtek/rtw89/cam.c
@@ -77,7 +77,7 @@ static int rtw89_cam_send_sec_key_cmd(struct rtw89_dev *rtwdev,
return 0;
ext_skb = rtw89_cam_get_sec_key_cmd(rtwdev, sec_cam, true);
- if (!skb) {
+ if (!ext_skb) {
rtw89_err(rtwdev, "failed to get ext sec key command\n");
return -ENOMEM;
}