Skip to content

Commit

Permalink
V4L/DVB (8789): wm8739: remove wrong kfree
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed Sep 11, 2008
1 parent 2389b36 commit 6c832e3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/media/video/wm8739.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6c832e3

Please sign in to comment.