提交 6c832e36 编写于 作者: H Hans Verkuil 提交者: Mauro Carvalho Chehab

V4L/DVB (8789): wm8739: remove wrong kfree

i2c_client is allocated for us, we should never free it ourselves.
Signed-off-by: NHans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 2389b360
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册