Commit ad732da4 authored by Dongliang Mu's avatar Dongliang Mu Committed by Kalle Valo

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: default avatarsyzkaller <syzkaller@googlegroups.com>
Signed-off-by: default avatarDongliang Mu <mudongliangabcd@gmail.com>
Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220511014453.1621366-1-dzm91@hust.edu.cn
parent 2c33360b
...@@ -1014,7 +1014,7 @@ int rtl_usb_probe(struct usb_interface *intf, ...@@ -1014,7 +1014,7 @@ int rtl_usb_probe(struct usb_interface *intf,
hw = ieee80211_alloc_hw(sizeof(struct rtl_priv) + hw = ieee80211_alloc_hw(sizeof(struct rtl_priv) +
sizeof(struct rtl_usb_priv), &rtl_ops); sizeof(struct rtl_usb_priv), &rtl_ops);
if (!hw) { if (!hw) {
WARN_ONCE(true, "rtl_usb: ieee80211 alloc failed\n"); pr_warn("rtl_usb: ieee80211 alloc failed\n");
return -ENOMEM; return -ENOMEM;
} }
rtlpriv = hw->priv; rtlpriv = hw->priv;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment