Commit 9048b51e authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] zatm fix

Repairs the breakage introduced in gcc4 fixes.  Original had expanded
to

	((struct zatm_dev *)(dev)->dev_data) = zatm_dev;

and that's what gcc4 had complained about (cast-as-lvalue).  Proper fix is,
of course,

	dev->dev_data = zatm_dev;

What we have in 2.6.10 is

	dev = (struct atm_dev *)zatm_dev;

which doesn't cause complaints, but doesn't do anything good (leak + corruption
at the very least).
Signed-off-by: default avatarAl Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 76d013d4
......@@ -1605,7 +1605,7 @@ static int __devinit zatm_init_one(struct pci_dev *pci_dev,
goto out_disable;
zatm_dev->pci_dev = pci_dev;
dev = (struct atm_dev *)zatm_dev;
dev->dev_data = zatm_dev;
zatm_dev->copper = (int)ent->driver_data;
if ((ret = zatm_init(dev)) || (ret = zatm_start(dev)))
goto out_release;
......
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