max17042_battery: Remove obsolete cleanup for clientdata
authorWolfram Sang <w.sang@pengutronix.de>
Mon, 20 Jun 2011 21:01:14 +0000 (23:01 +0200)
committerAnton Vorontsov <cbouatmailru@gmail.com>
Fri, 8 Jul 2011 12:58:15 +0000 (16:58 +0400)
A few new i2c-drivers came into the kernel which clear the
clientdata-pointer on exit or error. This is obsolete meanwhile,
the core will do it.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: MyungJoo Ham <myungjoo.ham@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
drivers/power/max17042_battery.c

index c5c8805156cbebe4ebc734052c175af4eb45aa37..09f7496a6d8c125b27a729e7933945e9973dbd0a 100644 (file)
@@ -183,7 +183,6 @@ static int __devinit max17042_probe(struct i2c_client *client,
        ret = power_supply_register(&client->dev, &chip->battery);
        if (ret) {
                dev_err(&client->dev, "failed: power supply register\n");
-               i2c_set_clientdata(client, NULL);
                kfree(chip);
                return ret;
        }
@@ -202,7 +201,6 @@ static int __devexit max17042_remove(struct i2c_client *client)
        struct max17042_chip *chip = i2c_get_clientdata(client);
 
        power_supply_unregister(&chip->battery);
-       i2c_set_clientdata(client, NULL);
        kfree(chip);
        return 0;
 }
This page took 0.028086 seconds and 5 git commands to generate.