Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 256272
b: refs/heads/master
c: 390fd0b
h: refs/heads/master
v: v3
  • Loading branch information
Matvejchikov Ilya authored and David S. Miller committed Jul 13, 2011
1 parent 244df51 commit f7da95e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 19 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: 9173a88f46bf53e2fa85337563b39e13c43c7f2e
refs/heads/master: 390fd0b388e4f85549e5d60bdeb21364b344d9b9
24 changes: 6 additions & 18 deletions trunk/drivers/net/slip.c
Original file line number Diff line number Diff line change
Expand Up @@ -723,6 +723,7 @@ static void sl_sync(void)
static struct slip *sl_alloc(dev_t line)
{
int i;
char name[IFNAMSIZ];
struct net_device *dev = NULL;
struct slip *sl;

Expand All @@ -735,25 +736,12 @@ static struct slip *sl_alloc(dev_t line)
if (i >= slip_maxdev)
return NULL;

if (dev) {
sl = netdev_priv(dev);
if (test_bit(SLF_INUSE, &sl->flags)) {
unregister_netdevice(dev);
dev = NULL;
slip_devs[i] = NULL;
}
}

if (!dev) {
char name[IFNAMSIZ];
sprintf(name, "sl%d", i);

dev = alloc_netdev(sizeof(*sl), name, sl_setup);
if (!dev)
return NULL;
dev->base_addr = i;
}
sprintf(name, "sl%d", i);
dev = alloc_netdev(sizeof(*sl), name, sl_setup);
if (!dev)
return NULL;

dev->base_addr = i;
sl = netdev_priv(dev);

/* Initialize channel control data */
Expand Down

0 comments on commit f7da95e

Please sign in to comment.