From: Wolfram Sang <wsa-dev@sang-engineering.com>
To: linux-usb@vger.kernel.org
Cc: Wolfram Sang <wsa-dev@sang-engineering.com>,
Amitkumar Karwar <akarwar@marvell.com>,
Nishant Sarmukadam <nishants@marvell.com>,
Kalle Valo <kvalo@codeaurora.org>,
linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 15/16] net: wireless: marvell: mwifiex: usb: don't print error when allocating urb fails
Date: Thu, 11 Aug 2016 23:13:07 +0200 [thread overview]
Message-ID: <1470949988-25705-3-git-send-email-wsa-dev@sang-engineering.com> (raw)
In-Reply-To: <1470949988-25705-1-git-send-email-wsa-dev@sang-engineering.com>
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
next prev parent reply other threads:[~2016-08-11 21:13 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-11 21:05 [PATCH 00/16] net: don't print error when allocating urb fails Wolfram Sang
[not found] ` <1470949539-25392-1-git-send-email-wsa-dev-jBu1N2QxHDJrcw3mvpCnnVaTQe2KTcn/@public.gmane.org>
2016-08-11 21:05 ` [PATCH 01/16] net: can: usb: ems_usb: " Wolfram Sang
2016-08-11 21:05 ` [PATCH 02/16] net: can: usb: esd_usb2: " Wolfram Sang
2016-08-11 21:05 ` [PATCH 03/16] net: can: usb: gs_usb: " Wolfram Sang
2016-08-11 21:05 ` [PATCH 04/16] net: can: usb: kvaser_usb: " Wolfram Sang
2016-08-11 21:05 ` [PATCH 05/16] net: can: usb: peak_usb: pcan_usb_core: " Wolfram Sang
2016-08-11 21:05 ` [PATCH 06/16] net: can: usb: usb_8dev: " Wolfram Sang
2016-08-11 21:05 ` [PATCH 07/16] net: usb: hso: " Wolfram Sang
2016-08-11 21:05 ` [PATCH 08/16] net: usb: lan78xx: " Wolfram Sang
[not found] ` <1470949539-25392-9-git-send-email-wsa-dev-jBu1N2QxHDJrcw3mvpCnnVaTQe2KTcn/@public.gmane.org>
2016-08-11 21:42 ` Woojung.Huh-UWL1GkI3JZL3oGB3hsPCZA
2016-08-11 21:05 ` [PATCH 09/16] net: usb: usbnet: " Wolfram Sang
2016-08-11 21:05 ` [PATCH 10/16] net: wimax: i2400m: usb-notif: " Wolfram Sang
2016-08-11 21:05 ` [PATCH 11/16] net: wireless: ath: ar5523: ar5523: " Wolfram Sang
2016-08-11 21:05 ` [PATCH 12/16] net: wireless: broadcom: brcm80211: brcmfmac: usb: " Wolfram Sang
2016-08-13 21:55 ` [PATCH 00/16] net: " David Miller
2016-08-11 21:13 ` [PATCH 13/16] net: wireless: intersil: orinoco: orinoco_usb: " 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 [this message]
[not found] ` <1470949988-25705-1-git-send-email-wsa-dev-jBu1N2QxHDJrcw3mvpCnnVaTQe2KTcn/@public.gmane.org>
2016-08-11 21:13 ` [PATCH 16/16] net: wireless: realtek: rtlwifi: usb: " Wolfram Sang
2016-08-11 21:35 ` Larry Finger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1470949988-25705-3-git-send-email-wsa-dev@sang-engineering.com \
--to=wsa-dev@sang-engineering.com \
--cc=akarwar@marvell.com \
--cc=kvalo@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nishants@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).