diff options
Diffstat (limited to 'drivers/hwmon/adm1026.c')
-rw-r--r-- | drivers/hwmon/adm1026.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hwmon/adm1026.c b/drivers/hwmon/adm1026.c index 4fa17c76eea2..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 | ||
@@ -1691,7 +1691,7 @@ int adm1026_detect(struct i2c_adapter *adapter, int address, | |||
1691 | 1691 | ||
1692 | /* Error out and cleanup code */ | 1692 | /* Error out and cleanup code */ |
1693 | exitfree: | 1693 | exitfree: |
1694 | kfree(new_client); | 1694 | kfree(data); |
1695 | exit: | 1695 | exit: |
1696 | return err; | 1696 | return err; |
1697 | } | 1697 | } |