Skip to content

Commit

Permalink
[media] mt9m032: use the available subdev pointer, don't re-calculate it
Browse files Browse the repository at this point in the history
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Guennadi Liakhovetski authored and Mauro Carvalho Chehab committed May 14, 2012
1 parent 5bfa474 commit b22b9f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/media/video/mt9m032.c
Original file line number Diff line number Diff line change
Expand Up @@ -838,9 +838,9 @@ static int mt9m032_remove(struct i2c_client *client)
struct v4l2_subdev *subdev = i2c_get_clientdata(client);
struct mt9m032 *sensor = to_mt9m032(subdev);

v4l2_device_unregister_subdev(&sensor->subdev);
v4l2_device_unregister_subdev(subdev);
v4l2_ctrl_handler_free(&sensor->ctrls);
media_entity_cleanup(&sensor->subdev.entity);
media_entity_cleanup(&subdev->entity);
mutex_destroy(&sensor->lock);
kfree(sensor);
return 0;
Expand Down

0 comments on commit b22b9f3

Please sign in to comment.