Commit e7d4b88f authored by Jan Kasprzak's avatar Jan Kasprzak Committed by Linus Torvalds

[PATCH] cosa.c intialization crash

This fixes crash on insmod of the cosa.ko module - the sppp_attach() was
called too early when dev->priv has not been set up yet. 
Signed-off-by: default avatarJan "Yenya" Kasprzak <kas@fi.muni.cz>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent aa44f1c5
......@@ -642,11 +642,11 @@ static void sppp_channel_init(struct channel_data *chan)
return;
}
chan->pppdev.dev = d;
sppp_attach(&chan->pppdev);
d->base_addr = chan->cosa->datareg;
d->irq = chan->cosa->irq;
d->dma = chan->cosa->dma;
d->priv = chan;
sppp_attach(&chan->pppdev);
if (register_netdev(d)) {
printk(KERN_WARNING "%s: register_netdev failed.\n", d->name);
sppp_detach(d);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment