media: i2c: ov5648: Free V4L2 fwnode data on unbind
Subsystems (2)
PATCH v2 1/1 media: i2c: ov5648: Free V4L2 fwnode data on unbind
The V4L2 fwnode data structure doesn't get freed on unbind, which leads to a memleak.
Fixes e43ccb0a045f ("media: i2c: Add support for the OV5648 image sensor")
Signed-off-by Rafael Mendonca <[email protected]>
Reviewed-by Tommaso Merciai <[email protected]>
Reviewed-by Paul Kocialkowski <[email protected]>
---v1->v2
- Remove empty line before call to free
--- drivers/media/i2c/ov5648.c | 1 + 1 file changed, 1 insertion(+)
drivers/media/i2c/ov5648.c +1 -0
@@ -2597,6 +2597,7 @@ static int ov5648_remove(struct i2c_client *client)v4l2_ctrl_handler_free (&sensor->ctrls.handler);mutex_destroy (&sensor->mutex);media_entity_cleanup (&subdev->entity); +v4l2_fwnode_endpoint_free (&sensor->endpoint);return 0 ; }
Signature · 1 line
2.34.1