Skip to content

Commit eb36333

Browse files
Wolfram Sangdavem330
authored andcommitted
net: wireless: realtek: rtlwifi: usb: don't print error when allocating urb fails
kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang <[email protected]> Acked-by: Larry Finger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent dbea99d commit eb36333

File tree

1 file changed

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

1 file changed

+1
-7
lines changed

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

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -739,11 +739,8 @@ static int _rtl_usb_receive(struct ieee80211_hw *hw)
739739
for (i = 0; i < rtlusb->rx_urb_num; i++) {
740740
err = -ENOMEM;
741741
urb = usb_alloc_urb(0, GFP_KERNEL);
742-
if (!urb) {
743-
RT_TRACE(rtlpriv, COMP_USB, DBG_EMERG,
744-
"Failed to alloc URB!!\n");
742+
if (!urb)
745743
goto err_out;
746-
}
747744

748745
err = _rtl_prep_rx_urb(hw, rtlusb, urb, GFP_KERNEL);
749746
if (err < 0) {
@@ -907,15 +904,12 @@ static void _rtl_tx_complete(struct urb *urb)
907904
static struct urb *_rtl_usb_tx_urb_setup(struct ieee80211_hw *hw,
908905
struct sk_buff *skb, u32 ep_num)
909906
{
910-
struct rtl_priv *rtlpriv = rtl_priv(hw);
911907
struct rtl_usb *rtlusb = rtl_usbdev(rtl_usbpriv(hw));
912908
struct urb *_urb;
913909

914910
WARN_ON(NULL == skb);
915911
_urb = usb_alloc_urb(0, GFP_ATOMIC);
916912
if (!_urb) {
917-
RT_TRACE(rtlpriv, COMP_USB, DBG_EMERG,
918-
"Can't allocate URB for bulk out!\n");
919913
kfree_skb(skb);
920914
return NULL;
921915
}

0 commit comments

Comments
 (0)