diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mfd/max8998.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mfd/max8998.c b/drivers/mfd/max8998.c index 06ddf741d4c7..bb9977bebe78 100644 --- a/drivers/mfd/max8998.c +++ b/drivers/mfd/max8998.c | |||
@@ -153,6 +153,8 @@ static int max8998_i2c_probe(struct i2c_client *i2c, | |||
153 | 153 | ||
154 | err: | 154 | err: |
155 | mfd_remove_devices(max8998->dev); | 155 | mfd_remove_devices(max8998->dev); |
156 | max8998_irq_exit(max8998); | ||
157 | i2c_unregister_device(max8998->rtc); | ||
156 | kfree(max8998); | 158 | kfree(max8998); |
157 | return ret; | 159 | return ret; |
158 | } | 160 | } |
@@ -162,6 +164,8 @@ static int max8998_i2c_remove(struct i2c_client *i2c) | |||
162 | struct max8998_dev *max8998 = i2c_get_clientdata(i2c); | 164 | struct max8998_dev *max8998 = i2c_get_clientdata(i2c); |
163 | 165 | ||
164 | mfd_remove_devices(max8998->dev); | 166 | mfd_remove_devices(max8998->dev); |
167 | max8998_irq_exit(max8998); | ||
168 | i2c_unregister_device(max8998->rtc); | ||
165 | kfree(max8998); | 169 | kfree(max8998); |
166 | 170 | ||
167 | return 0; | 171 | return 0; |