diff options
Diffstat (limited to 'drivers/media/video/wm8775.c')
-rw-r--r-- | drivers/media/video/wm8775.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/video/wm8775.c b/drivers/media/video/wm8775.c index 4df5d30d4d09..9f7e894ef962 100644 --- a/drivers/media/video/wm8775.c +++ b/drivers/media/video/wm8775.c | |||
@@ -222,12 +222,14 @@ static int wm8775_probe(struct i2c_adapter *adapter) | |||
222 | 222 | ||
223 | static int wm8775_detach(struct i2c_client *client) | 223 | static int wm8775_detach(struct i2c_client *client) |
224 | { | 224 | { |
225 | struct wm8775_state *state = i2c_get_clientdata(client); | ||
225 | int err; | 226 | int err; |
226 | 227 | ||
227 | err = i2c_detach_client(client); | 228 | err = i2c_detach_client(client); |
228 | if (err) { | 229 | if (err) { |
229 | return err; | 230 | return err; |
230 | } | 231 | } |
232 | kfree(state); | ||
231 | kfree(client); | 233 | kfree(client); |
232 | 234 | ||
233 | return 0; | 235 | return 0; |