Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 121949
b: refs/heads/master
c: c8019bf
h: refs/heads/master
i:
  121947: 67961be
v: v3
  • Loading branch information
Wang Chen authored and David S. Miller committed Nov 20, 2008
1 parent ca8dc62 commit 548cf21
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 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: f7b29271c35ed38f990ca3419696ca148349c2d3
refs/heads/master: c8019bf3aff653cceb64f66489fc299ee5957b57
15 changes: 5 additions & 10 deletions trunk/drivers/net/ppp_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,7 @@ static int __init ppp_init(void)
static int
ppp_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct ppp *ppp = (struct ppp *) dev->priv;
struct ppp *ppp = netdev_priv(dev);
int npi, proto;
unsigned char *pp;

Expand Down Expand Up @@ -931,7 +931,7 @@ ppp_start_xmit(struct sk_buff *skb, struct net_device *dev)
static int
ppp_net_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
{
struct ppp *ppp = dev->priv;
struct ppp *ppp = netdev_priv(dev);
int err = -EFAULT;
void __user *addr = (void __user *) ifr->ifr_ifru.ifru_data;
struct ppp_stats stats;
Expand Down Expand Up @@ -2418,13 +2418,12 @@ ppp_create_interface(int unit, int *retp)
int ret = -ENOMEM;
int i;

ppp = kzalloc(sizeof(struct ppp), GFP_KERNEL);
if (!ppp)
goto out;
dev = alloc_netdev(0, "", ppp_setup);
dev = alloc_netdev(sizeof(struct ppp), "", ppp_setup);
if (!dev)
goto out1;

ppp = netdev_priv(dev);
ppp->dev = dev;
ppp->mru = PPP_MRU;
init_ppp_file(&ppp->file, INTERFACE);
ppp->file.hdrlen = PPP_HDRLEN - 2; /* don't count proto bytes */
Expand All @@ -2437,8 +2436,6 @@ ppp_create_interface(int unit, int *retp)
ppp->minseq = -1;
skb_queue_head_init(&ppp->mrq);
#endif /* CONFIG_PPP_MULTILINK */
ppp->dev = dev;
dev->priv = ppp;

dev->hard_start_xmit = ppp_start_xmit;

Expand Down Expand Up @@ -2476,8 +2473,6 @@ ppp_create_interface(int unit, int *retp)
mutex_unlock(&all_ppp_mutex);
free_netdev(dev);
out1:
kfree(ppp);
out:
*retp = ret;
return NULL;
}
Expand Down

0 comments on commit 548cf21

Please sign in to comment.