mirror of
https://github.com/torvalds/linux.git
synced 2026-06-09 15:12:59 +02:00
media: i2c: ov5648: Free V4L2 fwnode data on unbind
[ Upstream commitc95770e4fc] The V4L2 fwnode data structure doesn't get freed on unbind, which leads to a memleak. Fixes:e43ccb0a04("media: i2c: Add support for the OV5648 image sensor") Signed-off-by: Rafael Mendonca <rafaelmendsr@gmail.com> Reviewed-by: Tommaso Merciai <tommaso.merciai@amarulasolutions.com> Reviewed-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
91a8528694
commit
3a54b72868
|
|
@ -2597,6 +2597,7 @@ static void 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);
|
||||
}
|
||||
|
||||
static const struct dev_pm_ops ov5648_pm_ops = {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user