Skip to content

Commit ad732da

Browse files
mudongliangKalle Valo
authored andcommitted
rtlwifi: Use pr_warn instead of WARN_ONCE
This memory allocation failure can be triggered by fault injection or high pressure testing, resulting a WARN. Fix this by replacing WARN with pr_warn. Reported-by: syzkaller <[email protected]> Signed-off-by: Dongliang Mu <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 2c33360 commit ad732da

File tree

1 file changed

+1
-1
lines changed
  • drivers/net/wireless/realtek/rtlwifi

1 file changed

+1
-1
lines changed

drivers/net/wireless/realtek/rtlwifi/usb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1014,7 +1014,7 @@ int rtl_usb_probe(struct usb_interface *intf,
10141014
hw = ieee80211_alloc_hw(sizeof(struct rtl_priv) +
10151015
sizeof(struct rtl_usb_priv), &rtl_ops);
10161016
if (!hw) {
1017-
WARN_ONCE(true, "rtl_usb: ieee80211 alloc failed\n");
1017+
pr_warn("rtl_usb: ieee80211 alloc failed\n");
10181018
return -ENOMEM;
10191019
}
10201020
rtlpriv = hw->priv;

0 commit comments

Comments
 (0)