Skip to content

Commit

Permalink
rtw89: fix return value check in rtw89_cam_send_sec_key_cmd()
Browse files Browse the repository at this point in the history
BugLink: https://bugs.launchpad.net/bugs/1945967

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: e3ec701 ("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
(cherry picked from commit a04310e linux-next)
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: Chia-Lin Kao (AceLan) <acelan.kao@canonical.com>
  • Loading branch information
Yang Yingliang authored and Chia-Lin Kao (AceLan) committed Oct 28, 2021
1 parent d6e415d commit ceac599
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/realtek/rtw89/cam.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit ceac599

Please sign in to comment.