From 634be628b5ccde3dcc9ba1a89c305cad0c286dd7 Mon Sep 17 00:00:00 2001 From: Biren Pandya Date: Wed, 15 Jul 2026 09:08:20 +0530 Subject: [PATCH] media: i2c: cx25840-core: Add missing media_entity_cleanup() The remove function is missing a call to media_entity_cleanup(). Add it. Signed-off-by: Biren Pandya Signed-off-by: Sakari Ailus --- drivers/media/i2c/cx25840/cx25840-core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/media/i2c/cx25840/cx25840-core.c b/drivers/media/i2c/cx25840/cx25840-core.c index 8110d40931d9..8b7dd43ed208 100644 --- a/drivers/media/i2c/cx25840/cx25840-core.c +++ b/drivers/media/i2c/cx25840/cx25840-core.c @@ -3962,6 +3962,7 @@ static int cx25840_probe(struct i2c_client *client) int err = state->hdl.error; v4l2_ctrl_handler_free(&state->hdl); + media_entity_cleanup(&sd->entity); return err; } if (!is_cx2583x(state)) @@ -3986,6 +3987,7 @@ static void cx25840_remove(struct i2c_client *client) cx25840_ir_remove(sd); v4l2_device_unregister_subdev(sd); v4l2_ctrl_handler_free(&state->hdl); + media_entity_cleanup(&sd->entity); } static const struct i2c_device_id cx25840_id[] = {