Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 150203
b: refs/heads/master
c: ab9c73c
h: refs/heads/master
i:
  150201: 84e0bbf
  150199: 22e8b73
v: v3
  • Loading branch information
Jiri Pirko authored and David S. Miller committed May 9, 2009
1 parent 99b8a03 commit 98a61a8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 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: 9948bb6a6db6ad6a8bf2ccaaceb780404f1f43df
refs/heads/master: ab9c73ccb52f40576ce017528d542eda3c6ae766
15 changes: 12 additions & 3 deletions trunk/net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -5007,13 +5007,16 @@ struct net_device *alloc_netdev_mq(int sizeof_priv, const char *name,
if (!tx) {
printk(KERN_ERR "alloc_netdev: Unable to allocate "
"tx qdiscs.\n");
kfree(p);
return NULL;
goto free_p;
}

dev = (struct net_device *)
(((long)p + NETDEV_ALIGN_CONST) & ~NETDEV_ALIGN_CONST);
dev->padded = (char *)dev - (char *)p;

if (dev_addr_init(dev))
goto free_tx;

dev_net_set(dev, &init_net);

dev->_tx = tx;
Expand All @@ -5022,13 +5025,19 @@ struct net_device *alloc_netdev_mq(int sizeof_priv, const char *name,

dev->gso_max_size = GSO_MAX_SIZE;

dev_addr_init(dev);
netdev_init_queues(dev);

INIT_LIST_HEAD(&dev->napi_list);
setup(dev);
strcpy(dev->name, name);
return dev;

free_tx:
kfree(tx);

free_p:
kfree(p);
return NULL;
}
EXPORT_SYMBOL(alloc_netdev_mq);

Expand Down

0 comments on commit 98a61a8

Please sign in to comment.