Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 357382
b: refs/heads/master
c: c7a857a
h: refs/heads/master
v: v3
  • Loading branch information
Lad, Prabhakar authored and Mauro Carvalho Chehab committed Feb 5, 2013
1 parent 14df04c commit cc91d21
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 08754d3185fb7a95b24ae2a5e143f457f556da77
refs/heads/master: c7a857a09f1f00e6cb04c6565c136a9f0018532d
9 changes: 3 additions & 6 deletions trunk/drivers/media/i2c/adv7343.c
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,8 @@ static int adv7343_probe(struct i2c_client *client,
v4l_info(client, "chip found @ 0x%x (%s)\n",
client->addr << 1, client->adapter->name);

state = kzalloc(sizeof(struct adv7343_state), GFP_KERNEL);
state = devm_kzalloc(&client->dev, sizeof(struct adv7343_state),
GFP_KERNEL);
if (state == NULL)
return -ENOMEM;

Expand Down Expand Up @@ -431,16 +432,13 @@ static int adv7343_probe(struct i2c_client *client,
int err = state->hdl.error;

v4l2_ctrl_handler_free(&state->hdl);
kfree(state);
return err;
}
v4l2_ctrl_handler_setup(&state->hdl);

err = adv7343_initialize(&state->sd);
if (err) {
if (err)
v4l2_ctrl_handler_free(&state->hdl);
kfree(state);
}
return err;
}

Expand All @@ -451,7 +449,6 @@ static int adv7343_remove(struct i2c_client *client)

v4l2_device_unregister_subdev(sd);
v4l2_ctrl_handler_free(&state->hdl);
kfree(state);

return 0;
}
Expand Down

0 comments on commit cc91d21

Please sign in to comment.