]> err.no Git - linux-2.6/commit
ibm_newemac: Call dev_set_drvdata() before tah_reset()
authorValentine Barshak <vbarshak@ru.mvista.com>
Wed, 5 Dec 2007 00:14:32 +0000 (11:14 +1100)
committerJeff Garzik <jeff@garzik.org>
Fri, 7 Dec 2007 20:09:06 +0000 (15:09 -0500)
commitd09e18bc194c3fa8ae880df4567c719c36a73e9e
tree9408f49b0ace39e09c60bb0f18ce6d85808395fa
parent63b6cad795e0a34e8670291943df8a6f653c1931
ibm_newemac: Call dev_set_drvdata() before tah_reset()

The patch moves dev_set_drvdata(&ofdev->dev, dev) up before tah_reset(ofdev)
is called to avoid a NULL pointer dereference, since tah_reset uses drvdata.

Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/ibm_newemac/tah.c