aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/wm8739.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/wm8739.c')
-rw-r--r--drivers/media/video/wm8739.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/video/wm8739.c b/drivers/media/video/wm8739.c
index 8f6741a28a47..1bf4cbec6a87 100644
--- a/drivers/media/video/wm8739.c
+++ b/drivers/media/video/wm8739.c
@@ -321,12 +321,14 @@ static int wm8739_probe(struct i2c_adapter *adapter)
321 321
322static int wm8739_detach(struct i2c_client *client) 322static int wm8739_detach(struct i2c_client *client)
323{ 323{
324 struct wm8739_state *state = i2c_get_clientdata(client);
324 int err; 325 int err;
325 326
326 err = i2c_detach_client(client); 327 err = i2c_detach_client(client);
327 if (err) 328 if (err)
328 return err; 329 return err;
329 330
331 kfree(state);
330 kfree(client); 332 kfree(client);
331 return 0; 333 return 0;
332} 334}