Commit 7de2696d authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] Fix imm/ppa initializing bug in driver updates

Let's play spot the bug here...

Amazing that it survives in modular case...
parent 5b2654c7
...@@ -1153,7 +1153,7 @@ static int __imm_attach(struct parport *pb) ...@@ -1153,7 +1153,7 @@ static int __imm_attach(struct parport *pb)
if (!dev) if (!dev)
return -ENOMEM; return -ENOMEM;
memset(dev, 0, sizeof(dev)); memset(dev, 0, sizeof(imm_struct));
dev->base = -1; dev->base = -1;
dev->mode = IMM_AUTODETECT; dev->mode = IMM_AUTODETECT;
......
...@@ -1010,7 +1010,7 @@ static int __ppa_attach(struct parport *pb) ...@@ -1010,7 +1010,7 @@ static int __ppa_attach(struct parport *pb)
dev = kmalloc(sizeof(ppa_struct), GFP_KERNEL); dev = kmalloc(sizeof(ppa_struct), GFP_KERNEL);
if (!dev) if (!dev)
return -ENOMEM; return -ENOMEM;
memset(dev, 0, sizeof(dev)); memset(dev, 0, sizeof(ppa_struct));
dev->base = -1; dev->base = -1;
dev->mode = PPA_AUTODETECT; dev->mode = PPA_AUTODETECT;
dev->recon_tmo = PPA_RECON_TMO; dev->recon_tmo = PPA_RECON_TMO;
......
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