Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 352100
b: refs/heads/master
c: 62b5942
h: refs/heads/master
v: v3
  • Loading branch information
Joe Perches authored and David S. Miller committed Feb 6, 2013
1 parent 0476804 commit c48327e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4d9e01da87caa9bc63c3284ab38e0dd53eeab6ae
refs/heads/master: 62b5942aa5182686e6bab2c6db5dbf2672b8981e
14 changes: 5 additions & 9 deletions trunk/net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -5958,10 +5958,9 @@ static int netif_alloc_rx_queues(struct net_device *dev)
BUG_ON(count < 1);

rx = kcalloc(count, sizeof(struct netdev_rx_queue), GFP_KERNEL);
if (!rx) {
pr_err("netdev: Unable to allocate %u rx queues\n", count);
if (!rx)
return -ENOMEM;
}

dev->_rx = rx;

for (i = 0; i < count; i++)
Expand Down Expand Up @@ -5992,10 +5991,9 @@ static int netif_alloc_netdev_queues(struct net_device *dev)
BUG_ON(count < 1);

tx = kcalloc(count, sizeof(struct netdev_queue), GFP_KERNEL);
if (!tx) {
pr_err("netdev: Unable to allocate %u tx queues\n", count);
if (!tx)
return -ENOMEM;
}

dev->_tx = tx;

netdev_for_each_tx_queue(dev, netdev_init_one_queue, NULL);
Expand Down Expand Up @@ -6482,10 +6480,8 @@ struct net_device *alloc_netdev_mqs(int sizeof_priv, const char *name,
alloc_size += NETDEV_ALIGN - 1;

p = kzalloc(alloc_size, GFP_KERNEL);
if (!p) {
pr_err("alloc_netdev: Unable to allocate device\n");
if (!p)
return NULL;
}

dev = PTR_ALIGN(p, NETDEV_ALIGN);
dev->padded = (char *)dev - (char *)p;
Expand Down
4 changes: 1 addition & 3 deletions trunk/net/core/netprio_cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,8 @@ static int extend_netdev_table(struct net_device *dev, u32 target_idx)

/* allocate & copy */
new = kzalloc(new_sz, GFP_KERNEL);
if (!new) {
pr_warn("Unable to alloc new priomap!\n");
if (!new)
return -ENOMEM;
}

if (old)
memcpy(new->priomap, old->priomap,
Expand Down

0 comments on commit c48327e

Please sign in to comment.