From: Joe Perches <joe@perches.com>
To: netdev@vger.kernel.org
Cc: Joerg Reuter <jreuter@yaina.de>,
Rusty Russell <rusty@rustcorp.com.au>,
"Michael S. Tsirkin" <mst@redhat.com>,
linux-hams@vger.kernel.org, linux-kernel@vger.kernel.org,
virtualization@lists.linux-foundation.org
Subject: [PATCH 8/8] drivers:net:misc: Remove unnecessary alloc/OOM messages
Date: Sun, 3 Feb 2013 19:28:15 -0800 [thread overview]
Message-ID: <a729555c8acf2cc3ef4c80531757b37a948c4e55.1359939013.git.joe@perches.com> (raw)
In-Reply-To: <cover.1359939012.git.joe@perches.com>
alloc failures already get standardized OOM
messages and a dump_stack.
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/hamradio/dmascc.c | 7 +------
drivers/net/phy/spi_ks8995.c | 4 +---
drivers/net/virtio_net.c | 4 +---
3 files changed, 3 insertions(+), 12 deletions(-)
diff --git a/drivers/net/hamradio/dmascc.c b/drivers/net/hamradio/dmascc.c
index ce555d9..6636022 100644
--- a/drivers/net/hamradio/dmascc.c
+++ b/drivers/net/hamradio/dmascc.c
@@ -463,13 +463,8 @@ static int __init setup_adapter(int card_base, int type, int n)
/* Initialize what is necessary for write_scc and write_scc_data */
info = kzalloc(sizeof(struct scc_info), GFP_KERNEL | GFP_DMA);
- if (!info) {
- printk(KERN_ERR "dmascc: "
- "could not allocate memory for %s at %#3x\n",
- hw[type].name, card_base);
+ if (!info)
goto out;
- }
-
info->dev[0] = alloc_netdev(0, "", dev_setup);
if (!info->dev[0]) {
diff --git a/drivers/net/phy/spi_ks8995.c b/drivers/net/phy/spi_ks8995.c
index 41eb8ff..5c87eef 100644
--- a/drivers/net/phy/spi_ks8995.c
+++ b/drivers/net/phy/spi_ks8995.c
@@ -275,10 +275,8 @@ static int ks8995_probe(struct spi_device *spi)
pdata = spi->dev.platform_data;
ks = kzalloc(sizeof(*ks), GFP_KERNEL);
- if (!ks) {
- dev_err(&spi->dev, "no memory for private data\n");
+ if (!ks)
return -ENOMEM;
- }
mutex_init(&ks->lock);
ks->pdata = pdata;
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index eda2042..381a2d8 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -976,10 +976,8 @@ static void virtnet_set_rx_mode(struct net_device *dev)
buf = kzalloc(((uc_count + mc_count) * ETH_ALEN) +
(2 * sizeof(mac_data->entries)), GFP_ATOMIC);
mac_data = buf;
- if (!buf) {
- dev_warn(&dev->dev, "No memory for MAC address buffer\n");
+ if (!buf)
return;
- }
sg_init_table(sg, 2);
--
1.8.0.dirty
next prev parent reply other threads:[~2013-02-04 3:30 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-04 3:28 [PATCH 0/8] drivers/net: " Joe Perches
2013-02-04 3:28 ` [PATCH 1/8] caif: " Joe Perches
2013-02-04 3:28 ` [PATCH 2/8] can: " Joe Perches
2013-02-04 9:02 ` Marc Kleine-Budde
2013-02-04 3:28 ` [PATCH 4/8] drivers: net: usb: " Joe Perches
2013-02-04 3:28 ` [PATCH 5/8] wan: " Joe Perches
2013-02-10 20:30 ` Krzysztof Halasa
2013-02-04 3:28 ` [PATCH 6/8] wimax: Remove unnecessary alloc/OOM messages, alloc cleanups Joe Perches
2013-02-04 3:28 ` [PATCH 7/8] wireless: " Joe Perches
2013-02-04 3:28 ` Joe Perches [this message]
2013-02-07 4:08 ` [PATCH 8/8] drivers:net:misc: Remove unnecessary alloc/OOM messages Rusty Russell
2013-02-04 3:43 ` [PATCH 3/8] ethernet: Remove unnecessary alloc/OOM messages, alloc cleanups Joe Perches
2013-02-04 18:23 ` [PATCH 0/8] drivers/net: Remove unnecessary alloc/OOM messages David Miller
2013-02-05 2:48 ` [PATCH] net: core: " Joe Perches
2013-02-06 20:02 ` David Miller
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=a729555c8acf2cc3ef4c80531757b37a948c4e55.1359939013.git.joe@perches.com \
--to=joe@perches.com \
--cc=jreuter@yaina.de \
--cc=linux-hams@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
--cc=virtualization@lists.linux-foundation.org \
/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
all inboxes | Powered by JetHome®