[media] mt9m032: use the available subdev pointer, don't re-calculate it

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>
This commit is contained in:
Guennadi Liakhovetski 2012-04-18 05:00:52 -03:00 committed by Mauro Carvalho Chehab
parent 5bfa474b54
commit b22b9f3200
1 changed files with 2 additions and 2 deletions

View File

@ -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;