From: Hans Verkuil Date: Sun, 24 Aug 2008 09:29:30 +0000 (-0300) Subject: V4L/DVB (8789): wm8739: remove wrong kfree X-Git-Tag: v2.6.27-rc9~6^2~31 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=6c832e36447821779344f3d33970a4a7a10245cc;p=linux-2.6-omap-h63xx.git V4L/DVB (8789): wm8739: remove wrong kfree i2c_client is allocated for us, we should never free it ourselves. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/wm8739.c b/drivers/media/video/wm8739.c index 95c79ad8048..54ac3fe26ec 100644 --- a/drivers/media/video/wm8739.c +++ b/drivers/media/video/wm8739.c @@ -274,10 +274,8 @@ static int wm8739_probe(struct i2c_client *client, client->addr << 1, client->adapter->name); state = kmalloc(sizeof(struct wm8739_state), GFP_KERNEL); - if (state == NULL) { - kfree(client); + if (state == NULL) return -ENOMEM; - } state->vol_l = 0x17; /* 0dB */ state->vol_r = 0x17; /* 0dB */ state->muted = 0;