diff -urpN --exclude-from=/home/davej/.exclude bk-linus/drivers/net/macsonic.c linux-2.5/drivers/net/macsonic.c --- bk-linus/drivers/net/macsonic.c 2002-11-21 02:16:19.000000000 +0000 +++ linux-2.5/drivers/net/macsonic.c 2002-11-21 17:59:22.000000000 +0000 @@ -346,20 +347,7 @@ int __init mac_onboard_sonic_probe(struc printk("yes\n"); - if (dev) { - dev = init_etherdev(dev, sizeof(struct sonic_local)); - if (!dev) - return -ENOMEM; - /* methinks this will always be true but better safe than sorry */ - if (dev->priv == NULL) { - dev->priv = kmalloc(sizeof(struct sonic_local), GFP_KERNEL); - if (!dev->priv) - return -ENOMEM; - } - } else { - dev = init_etherdev(NULL, sizeof(struct sonic_local)); - } - + dev = init_etherdev(NULL, sizeof(struct sonic_local)); if (dev == NULL) return -ENOMEM; @@ -569,25 +557,12 @@ int __init mac_nubus_sonic_probe(struct return -ENODEV; } - if (dev) { - dev = init_etherdev(dev, sizeof(struct sonic_local)); - if (!dev) - return -ENOMEM; - /* methinks this will always be true but better safe than sorry */ - if (dev->priv == NULL) { - dev->priv = kmalloc(sizeof(struct sonic_local), GFP_KERNEL); - if (!dev->priv) /* FIXME: kfree dev if necessary */ - return -ENOMEM; - } - } else { - dev = init_etherdev(NULL, sizeof(struct sonic_local)); - } - + dev = init_etherdev(NULL, sizeof(struct sonic_local)); if (dev == NULL) return -ENOMEM; lp = (struct sonic_local*) dev->priv; - memset(lp, 0, sizeof(struct sonic_local)); + /* Danger! My arms are flailing wildly! You *must* set this before using sonic_read() */ dev->base_addr = base_addr;