Commit:     d09e18bc194c3fa8ae880df4567c719c36a73e9e
Parent:     63b6cad795e0a34e8670291943df8a6f653c1931
Author:     Valentine Barshak <[EMAIL PROTECTED]>
AuthorDate: Wed Dec 5 11:14:32 2007 +1100
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Fri Dec 7 15:09:06 2007 -0500

    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 <[EMAIL PROTECTED]>
    Signed-off-by: Benjamin Herrenschmidt <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
 drivers/net/ibm_newemac/tah.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/net/ibm_newemac/tah.c b/drivers/net/ibm_newemac/tah.c
index f161fb1..6e35cbe 100644
--- a/drivers/net/ibm_newemac/tah.c
+++ b/drivers/net/ibm_newemac/tah.c
@@ -116,13 +116,14 @@ static int __devinit tah_probe(struct of_device *ofdev,
                goto err_free;
+       dev_set_drvdata(&ofdev->dev, dev);
        /* Initialize TAH and enable IPv4 checksum verification, no TSO yet */
               "TAH %s initialized\n", ofdev->node->full_name);
-       dev_set_drvdata(&ofdev->dev, dev);
        return 0;
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to