mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 13/16] net: wireless: intersil: orinoco: orinoco_usb: don't print error when allocating urb fails
       [not found] <1470949539-25392-1-git-send-email-wsa-dev@sang-engineering.com>
@ 2016-08-11 21:13 ` Wolfram Sang
  2016-08-11 21:13   ` [PATCH 14/16] net: wireless: marvell: libertas_tf: if_usb: " Wolfram Sang
                     ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Wolfram Sang @ 2016-08-11 21:13 UTC (permalink / raw)
  To: linux-usb; +Cc: Wolfram Sang, Kalle Valo, linux-wireless, netdev, linux-kernel

kmalloc will print enough information in case of failure.

Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com>
---
 drivers/net/wireless/intersil/orinoco/orinoco_usb.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/wireless/intersil/orinoco/orinoco_usb.c b/drivers/net/wireless/intersil/orinoco/orinoco_usb.c
index 56f109bc83945d..bca6935a94db9a 100644
--- a/drivers/net/wireless/intersil/orinoco/orinoco_usb.c
+++ b/drivers/net/wireless/intersil/orinoco/orinoco_usb.c
@@ -1613,10 +1613,8 @@ static int ezusb_probe(struct usb_interface *interface,
 			}
 
 			upriv->read_urb = usb_alloc_urb(0, GFP_KERNEL);
-			if (!upriv->read_urb) {
-				err("No free urbs available");
+			if (!upriv->read_urb)
 				goto error;
-			}
 			if (le16_to_cpu(ep->wMaxPacketSize) != 64)
 				pr_warn("bulk in: wMaxPacketSize!= 64\n");
 			if (ep->bEndpointAddress != (2 | USB_DIR_IN))
-- 
2.8.1

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 14/16] net: wireless: marvell: libertas_tf: if_usb: don't print error when allocating urb fails
  2016-08-11 21:13 ` [PATCH 13/16] net: wireless: intersil: orinoco: orinoco_usb: don't print error when allocating urb fails Wolfram Sang
@ 2016-08-11 21:13   ` Wolfram Sang
  2016-08-11 21:13   ` [PATCH 15/16] net: wireless: marvell: mwifiex: usb: " Wolfram Sang
  2016-08-11 21:13   ` [PATCH 16/16] net: wireless: realtek: rtlwifi: " Wolfram Sang
  2 siblings, 0 replies; 5+ messages in thread
From: Wolfram Sang @ 2016-08-11 21:13 UTC (permalink / raw)
  To: linux-usb; +Cc: Wolfram Sang, Kalle Valo, linux-wireless, netdev, linux-kernel

kmalloc will print enough information in case of failure.

Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com>
---
 drivers/net/wireless/marvell/libertas_tf/if_usb.c | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/drivers/net/wireless/marvell/libertas_tf/if_usb.c b/drivers/net/wireless/marvell/libertas_tf/if_usb.c
index 799a2efe579372..e0ade40d9497d7 100644
--- a/drivers/net/wireless/marvell/libertas_tf/if_usb.c
+++ b/drivers/net/wireless/marvell/libertas_tf/if_usb.c
@@ -198,22 +198,16 @@ static int if_usb_probe(struct usb_interface *intf,
 	}
 
 	cardp->rx_urb = usb_alloc_urb(0, GFP_KERNEL);
-	if (!cardp->rx_urb) {
-		lbtf_deb_usbd(&udev->dev, "Rx URB allocation failed\n");
+	if (!cardp->rx_urb)
 		goto dealloc;
-	}
 
 	cardp->tx_urb = usb_alloc_urb(0, GFP_KERNEL);
-	if (!cardp->tx_urb) {
-		lbtf_deb_usbd(&udev->dev, "Tx URB allocation failed\n");
+	if (!cardp->tx_urb)
 		goto dealloc;
-	}
 
 	cardp->cmd_urb = usb_alloc_urb(0, GFP_KERNEL);
-	if (!cardp->cmd_urb) {
-		lbtf_deb_usbd(&udev->dev, "Cmd URB allocation failed\n");
+	if (!cardp->cmd_urb)
 		goto dealloc;
-	}
 
 	cardp->ep_out_buf = kmalloc(MRVDRV_ETH_TX_PACKET_BUFFER_SIZE,
 				    GFP_KERNEL);
-- 
2.8.1

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 15/16] net: wireless: marvell: mwifiex: usb: don't print error when allocating urb fails
  2016-08-11 21:13 ` [PATCH 13/16] net: wireless: intersil: orinoco: orinoco_usb: don't print error when allocating urb fails Wolfram Sang
  2016-08-11 21:13   ` [PATCH 14/16] net: wireless: marvell: libertas_tf: if_usb: " Wolfram Sang
@ 2016-08-11 21:13   ` Wolfram Sang
  2016-08-11 21:13   ` [PATCH 16/16] net: wireless: realtek: rtlwifi: " Wolfram Sang
  2 siblings, 0 replies; 5+ messages in thread
From: Wolfram Sang @ 2016-08-11 21:13 UTC (permalink / raw)
  To: linux-usb
  Cc: Wolfram Sang, Amitkumar Karwar, Nishant Sarmukadam, Kalle Valo,
	linux-wireless, netdev, linux-kernel

kmalloc will print enough information in case of failure.

Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com>
---
 drivers/net/wireless/marvell/mwifiex/usb.c | 19 ++++---------------
 1 file changed, 4 insertions(+), 15 deletions(-)

diff --git a/drivers/net/wireless/marvell/mwifiex/usb.c b/drivers/net/wireless/marvell/mwifiex/usb.c
index 0857575c5c39fe..3bd04f52f36988 100644
--- a/drivers/net/wireless/marvell/mwifiex/usb.c
+++ b/drivers/net/wireless/marvell/mwifiex/usb.c
@@ -657,11 +657,8 @@ static int mwifiex_usb_tx_init(struct mwifiex_adapter *adapter)
 	card->tx_cmd.ep = card->tx_cmd_ep;
 
 	card->tx_cmd.urb = usb_alloc_urb(0, GFP_KERNEL);
-	if (!card->tx_cmd.urb) {
-		mwifiex_dbg(adapter, ERROR,
-			    "tx_cmd.urb allocation failed\n");
+	if (!card->tx_cmd.urb)
 		return -ENOMEM;
-	}
 
 	for (i = 0; i < MWIFIEX_TX_DATA_PORT; i++) {
 		port = &card->port[i];
@@ -677,11 +674,8 @@ static int mwifiex_usb_tx_init(struct mwifiex_adapter *adapter)
 			port->tx_data_list[j].ep = port->tx_data_ep;
 			port->tx_data_list[j].urb =
 					usb_alloc_urb(0, GFP_KERNEL);
-			if (!port->tx_data_list[j].urb) {
-				mwifiex_dbg(adapter, ERROR,
-					    "urb allocation failed\n");
+			if (!port->tx_data_list[j].urb)
 				return -ENOMEM;
-			}
 		}
 	}
 
@@ -697,10 +691,8 @@ static int mwifiex_usb_rx_init(struct mwifiex_adapter *adapter)
 	card->rx_cmd.ep = card->rx_cmd_ep;
 
 	card->rx_cmd.urb = usb_alloc_urb(0, GFP_KERNEL);
-	if (!card->rx_cmd.urb) {
-		mwifiex_dbg(adapter, ERROR, "rx_cmd.urb allocation failed\n");
+	if (!card->rx_cmd.urb)
 		return -ENOMEM;
-	}
 
 	card->rx_cmd.skb = dev_alloc_skb(MWIFIEX_RX_CMD_BUF_SIZE);
 	if (!card->rx_cmd.skb)
@@ -714,11 +706,8 @@ static int mwifiex_usb_rx_init(struct mwifiex_adapter *adapter)
 		card->rx_data_list[i].ep = card->rx_data_ep;
 
 		card->rx_data_list[i].urb = usb_alloc_urb(0, GFP_KERNEL);
-		if (!card->rx_data_list[i].urb) {
-			mwifiex_dbg(adapter, ERROR,
-				    "rx_data_list[] urb allocation failed\n");
+		if (!card->rx_data_list[i].urb)
 			return -1;
-		}
 		if (mwifiex_usb_submit_rx_urb(&card->rx_data_list[i],
 					      MWIFIEX_RX_DATA_BUF_SIZE))
 			return -1;
-- 
2.8.1

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 16/16] net: wireless: realtek: rtlwifi: usb: don't print error when allocating urb fails
  2016-08-11 21:13 ` [PATCH 13/16] net: wireless: intersil: orinoco: orinoco_usb: don't print error when allocating urb fails Wolfram Sang
  2016-08-11 21:13   ` [PATCH 14/16] net: wireless: marvell: libertas_tf: if_usb: " Wolfram Sang
  2016-08-11 21:13   ` [PATCH 15/16] net: wireless: marvell: mwifiex: usb: " Wolfram Sang
@ 2016-08-11 21:13   ` Wolfram Sang
  2016-08-11 21:35     ` Larry Finger
  2 siblings, 1 reply; 5+ messages in thread
From: Wolfram Sang @ 2016-08-11 21:13 UTC (permalink / raw)
  To: linux-usb
  Cc: Wolfram Sang, Larry Finger, Chaoming Li, Kalle Valo,
	linux-wireless, netdev, linux-kernel

kmalloc will print enough information in case of failure.

Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com>
---
 drivers/net/wireless/realtek/rtlwifi/usb.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/usb.c b/drivers/net/wireless/realtek/rtlwifi/usb.c
index 41617b7b082260..32aa5c1d070a07 100644
--- a/drivers/net/wireless/realtek/rtlwifi/usb.c
+++ b/drivers/net/wireless/realtek/rtlwifi/usb.c
@@ -739,11 +739,8 @@ static int _rtl_usb_receive(struct ieee80211_hw *hw)
 	for (i = 0; i < rtlusb->rx_urb_num; i++) {
 		err = -ENOMEM;
 		urb = usb_alloc_urb(0, GFP_KERNEL);
-		if (!urb) {
-			RT_TRACE(rtlpriv, COMP_USB, DBG_EMERG,
-				 "Failed to alloc URB!!\n");
+		if (!urb)
 			goto err_out;
-		}
 
 		err = _rtl_prep_rx_urb(hw, rtlusb, urb, GFP_KERNEL);
 		if (err < 0) {
@@ -907,15 +904,12 @@ static void _rtl_tx_complete(struct urb *urb)
 static struct urb *_rtl_usb_tx_urb_setup(struct ieee80211_hw *hw,
 				struct sk_buff *skb, u32 ep_num)
 {
-	struct rtl_priv *rtlpriv = rtl_priv(hw);
 	struct rtl_usb *rtlusb = rtl_usbdev(rtl_usbpriv(hw));
 	struct urb *_urb;
 
 	WARN_ON(NULL == skb);
 	_urb = usb_alloc_urb(0, GFP_ATOMIC);
 	if (!_urb) {
-		RT_TRACE(rtlpriv, COMP_USB, DBG_EMERG,
-			 "Can't allocate URB for bulk out!\n");
 		kfree_skb(skb);
 		return NULL;
 	}
-- 
2.8.1

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 16/16] net: wireless: realtek: rtlwifi: usb: don't print error when allocating urb fails
  2016-08-11 21:13   ` [PATCH 16/16] net: wireless: realtek: rtlwifi: " Wolfram Sang
@ 2016-08-11 21:35     ` Larry Finger
  0 siblings, 0 replies; 5+ messages in thread
From: Larry Finger @ 2016-08-11 21:35 UTC (permalink / raw)
  To: Wolfram Sang, linux-usb
  Cc: Chaoming Li, Kalle Valo, linux-wireless, netdev, linux-kernel

On 08/11/2016 04:13 PM, Wolfram Sang wrote:
> kmalloc will print enough information in case of failure.
>
> Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com>
> ---
>  drivers/net/wireless/realtek/rtlwifi/usb.c | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)

Acked-by: Larry Finger <Larry.Finger@lwfinger.net>

>
> diff --git a/drivers/net/wireless/realtek/rtlwifi/usb.c b/drivers/net/wireless/realtek/rtlwifi/usb.c
> index 41617b7b082260..32aa5c1d070a07 100644
> --- a/drivers/net/wireless/realtek/rtlwifi/usb.c
> +++ b/drivers/net/wireless/realtek/rtlwifi/usb.c
> @@ -739,11 +739,8 @@ static int _rtl_usb_receive(struct ieee80211_hw *hw)
>  	for (i = 0; i < rtlusb->rx_urb_num; i++) {
>  		err = -ENOMEM;
>  		urb = usb_alloc_urb(0, GFP_KERNEL);
> -		if (!urb) {
> -			RT_TRACE(rtlpriv, COMP_USB, DBG_EMERG,
> -				 "Failed to alloc URB!!\n");
> +		if (!urb)
>  			goto err_out;
> -		}
>
>  		err = _rtl_prep_rx_urb(hw, rtlusb, urb, GFP_KERNEL);
>  		if (err < 0) {
> @@ -907,15 +904,12 @@ static void _rtl_tx_complete(struct urb *urb)
>  static struct urb *_rtl_usb_tx_urb_setup(struct ieee80211_hw *hw,
>  				struct sk_buff *skb, u32 ep_num)
>  {
> -	struct rtl_priv *rtlpriv = rtl_priv(hw);
>  	struct rtl_usb *rtlusb = rtl_usbdev(rtl_usbpriv(hw));
>  	struct urb *_urb;
>
>  	WARN_ON(NULL == skb);
>  	_urb = usb_alloc_urb(0, GFP_ATOMIC);
>  	if (!_urb) {
> -		RT_TRACE(rtlpriv, COMP_USB, DBG_EMERG,
> -			 "Can't allocate URB for bulk out!\n");
>  		kfree_skb(skb);
>  		return NULL;
>  	}
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-08-11 21:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1470949539-25392-1-git-send-email-wsa-dev@sang-engineering.com>
2016-08-11 21:13 ` [PATCH 13/16] net: wireless: intersil: orinoco: orinoco_usb: don't print error when allocating urb fails Wolfram Sang
2016-08-11 21:13   ` [PATCH 14/16] net: wireless: marvell: libertas_tf: if_usb: " Wolfram Sang
2016-08-11 21:13   ` [PATCH 15/16] net: wireless: marvell: mwifiex: usb: " Wolfram Sang
2016-08-11 21:13   ` [PATCH 16/16] net: wireless: realtek: rtlwifi: " Wolfram Sang
2016-08-11 21:35     ` Larry Finger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome