Merge branch 'fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6
[pandora-kernel.git] / drivers / mfd / tps65010.c
index e595530..9b22a77 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;
 }