* [PATCH v2] media: i2c: ov5648: Free V4L2 fwnode data on unbind
@ 2022-09-20 14:27 Rafael Mendonca
0 siblings, 0 replies; only message in thread
From: Rafael Mendonca @ 2022-09-20 14:27 UTC (permalink / raw)
To: Mauro Carvalho Chehab, Paul Kocialkowski, Sakari Ailus
Cc: Rafael Mendonca, Tommaso Merciai, Mauro Carvalho Chehab,
linux-media, linux-kernel
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 <rafaelmendsr@gmail.com>
Reviewed-by: Tommaso Merciai <tommaso.merciai@amarulasolutions.com>
Reviewed-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
---
v1->v2
- Remove empty line before call to free
---
drivers/media/i2c/ov5648.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/media/i2c/ov5648.c b/drivers/media/i2c/ov5648.c
index dfcd33e9ee13..220c53565b0a 100644
--- a/drivers/media/i2c/ov5648.c
+++ b/drivers/media/i2c/ov5648.c
@@ -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;
}
--
2.34.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-09-20 14:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-20 14:27 [PATCH v2] media: i2c: ov5648: Free V4L2 fwnode data on unbind Rafael Mendonca
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®