]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/mfd/tps65010.c
mfd: Fix dangling pointers
[net-next-2.6.git] / drivers / mfd / tps65010.c
index e5955306c2fa3397d97c5dba149adf1c67213159..9b22a77f70f5dac90aec0395d176d9ad06d4a71f 100644 (file)
@@ -530,8 +530,8 @@ static int __exit tps65010_remove(struct i2c_client *client)
        cancel_delayed_work(&tps->work);
        flush_scheduled_work();
        debugfs_remove(tps->file);
-       kfree(tps);
        i2c_set_clientdata(client, NULL);
+       kfree(tps);
        the_tps = NULL;
        return 0;
 }