aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/wm8775.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2007-07-20 06:25:22 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-07-20 17:35:57 -0300
commit1b2232ab879993fcf5b9391c3febf6ab5d78201e (patch)
tree276a20811a8b8fd2bf83c30396d587eacefff0ad /drivers/media/video/wm8775.c
parent2fc9e2f78acd06d0a76a05abb2802cc4616453e3 (diff)
downloadkernel_samsung_aries-1b2232ab879993fcf5b9391c3febf6ab5d78201e.zip
kernel_samsung_aries-1b2232ab879993fcf5b9391c3febf6ab5d78201e.tar.gz
kernel_samsung_aries-1b2232ab879993fcf5b9391c3febf6ab5d78201e.tar.bz2
V4L/DVB (5880): wm8775/wm8739: Fix memory leak when unloading module
State struct was never freed. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/wm8775.c')
-rw-r--r--drivers/media/video/wm8775.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/video/wm8775.c b/drivers/media/video/wm8775.c
index 4df5d30..9f7e894 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)
static int wm8775_detach(struct i2c_client *client)
{
+ struct wm8775_state *state = i2c_get_clientdata(client);
int err;
err = i2c_detach_client(client);
if (err) {
return err;
}
+ kfree(state);
kfree(client);
return 0;