diff options
| author | Biren Pandya <birenpandya@gmail.com> | 2026-07-15 09:08:23 +0530 |
|---|---|---|
| committer | Sakari Ailus <sakari.ailus@linux.intel.com> | 2026-07-20 09:28:43 +0300 |
| commit | ff340ae9b1b0589db374d3da64d1566d8bfc5fdb (patch) | |
| tree | 07ffc28a1dae240d5315844b1c4f0cd62edc163a | |
| parent | 87d1307b6791eb3910836a66ea5d3a5b1f72f500 (diff) | |
media: i2c: mt9v011: Add missing media_entity_cleanup()
The remove function is missing a call to media_entity_cleanup(). Add it.
Signed-off-by: Biren Pandya <birenpandya@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
| -rw-r--r-- | drivers/media/i2c/mt9v011.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/i2c/mt9v011.c b/drivers/media/i2c/mt9v011.c index 985517f1cff7..ff55a8ff32b4 100644 --- a/drivers/media/i2c/mt9v011.c +++ b/drivers/media/i2c/mt9v011.c @@ -520,6 +520,7 @@ static int mt9v011_probe(struct i2c_client *c) (version != MT9V011_REV_B_VERSION)) { v4l2_info(sd, "*** unknown micron chip detected (0x%04x).\n", version); + media_entity_cleanup(&sd->entity); return -EINVAL; } @@ -542,6 +543,7 @@ static int mt9v011_probe(struct i2c_client *c) v4l2_err(sd, "control initialization error %d\n", ret); v4l2_ctrl_handler_free(&core->ctrls); + media_entity_cleanup(&sd->entity); return ret; } core->sd.ctrl_handler = &core->ctrls; @@ -577,6 +579,7 @@ static void mt9v011_remove(struct i2c_client *c) v4l2_device_unregister_subdev(sd); v4l2_ctrl_handler_free(&core->ctrls); + media_entity_cleanup(&sd->entity); } /* ----------------------------------------------------------------------- */ |
