V4L/DVB (8789): wm8739: remove wrong kfree
i2c_client is allocated for us, we should never free it ourselves. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
2389b36072
commit
6c832e3644
1 changed files with 1 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue