Skip to content

Commit

Permalink
wifi: rtl8xxxu: fix error messages
Browse files Browse the repository at this point in the history
The first parameter of WARN_ONCE() is a condition so this code will end
up printing the function name instead of the proper message.

Fixes: 3ff7a05 ("wifi: rtl8xxxu: support setting bssid register for multiple interfaces")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/7b144531-a8da-4725-8911-9b614a525a35@moroto.mountain
  • Loading branch information
Dan Carpenter authored and Kalle Valo committed Feb 1, 2024
1 parent f1abee7 commit 17903a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -3593,7 +3593,7 @@ static int rtl8xxxu_set_mac(struct rtl8xxxu_priv *priv, int port_num)
reg = REG_MACID1;
break;
default:
WARN_ONCE("%s: invalid port_num\n", __func__);
WARN_ONCE(1, "%s: invalid port_num\n", __func__);
return -EINVAL;
}

Expand All @@ -3618,7 +3618,7 @@ static int rtl8xxxu_set_bssid(struct rtl8xxxu_priv *priv, const u8 *bssid, int p
reg = REG_BSSID1;
break;
default:
WARN_ONCE("%s: invalid port_num\n", __func__);
WARN_ONCE(1, "%s: invalid port_num\n", __func__);
return -EINVAL;
}

Expand Down

0 comments on commit 17903a2

Please sign in to comment.