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>
This commit is contained in:
Biren Pandya 2026-07-15 09:08:23 +05:30 committed by Sakari Ailus
parent 87d1307b67
commit ff340ae9b1

View File

@ -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);
}
/* ----------------------------------------------------------------------- */