diff options
Diffstat (limited to 'drivers/hwmon')
-rw-r--r-- | drivers/hwmon/adm1026.c | 2 | ||||
-rw-r--r-- | drivers/hwmon/adm1031.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hwmon/adm1026.c b/drivers/hwmon/adm1026.c index ded6e8adc854..c8a7f47911f9 100644 --- a/drivers/hwmon/adm1026.c +++ b/drivers/hwmon/adm1026.c | |||
@@ -325,7 +325,7 @@ int adm1026_attach_adapter(struct i2c_adapter *adapter) | |||
325 | int adm1026_detach_client(struct i2c_client *client) | 325 | int adm1026_detach_client(struct i2c_client *client) |
326 | { | 326 | { |
327 | i2c_detach_client(client); | 327 | i2c_detach_client(client); |
328 | kfree(client); | 328 | kfree(i2c_get_clientdata(client)); |
329 | return 0; | 329 | return 0; |
330 | } | 330 | } |
331 | 331 | ||
diff --git a/drivers/hwmon/adm1031.c b/drivers/hwmon/adm1031.c index 4211c8b4601a..936250957270 100644 --- a/drivers/hwmon/adm1031.c +++ b/drivers/hwmon/adm1031.c | |||
@@ -845,7 +845,7 @@ static int adm1031_detach_client(struct i2c_client *client) | |||
845 | if ((ret = i2c_detach_client(client)) != 0) { | 845 | if ((ret = i2c_detach_client(client)) != 0) { |
846 | return ret; | 846 | return ret; |
847 | } | 847 | } |
848 | kfree(client); | 848 | kfree(i2c_get_clientdata(client)); |
849 | return 0; | 849 | return 0; |
850 | } | 850 | } |
851 | 851 | ||