mirror of
https://github.com/torvalds/linux.git
synced 2026-09-24 06:24:02 +02:00
media: i2c: max9286: Add missing media_entity_cleanup()
The remove function is missing a call to media_entity_cleanup(). Add it. Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Biren Pandya <birenpandya@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
This commit is contained in:
parent
634be628b5
commit
d2bc475254
|
|
@ -1062,7 +1062,7 @@ static int max9286_v4l2_register(struct max9286_priv *priv)
|
|||
priv->sd.state_lock = priv->ctrls.lock;
|
||||
ret = v4l2_subdev_init_finalize(&priv->sd);
|
||||
if (ret)
|
||||
goto err_async;
|
||||
goto err_entity;
|
||||
|
||||
ret = v4l2_async_register_subdev(&priv->sd);
|
||||
if (ret < 0) {
|
||||
|
|
@ -1074,6 +1074,8 @@ static int max9286_v4l2_register(struct max9286_priv *priv)
|
|||
|
||||
err_subdev:
|
||||
v4l2_subdev_cleanup(&priv->sd);
|
||||
err_entity:
|
||||
media_entity_cleanup(&priv->sd.entity);
|
||||
err_async:
|
||||
v4l2_ctrl_handler_free(&priv->ctrls);
|
||||
max9286_v4l2_notifier_unregister(priv);
|
||||
|
|
@ -1084,6 +1086,7 @@ static int max9286_v4l2_register(struct max9286_priv *priv)
|
|||
static void max9286_v4l2_unregister(struct max9286_priv *priv)
|
||||
{
|
||||
v4l2_subdev_cleanup(&priv->sd);
|
||||
media_entity_cleanup(&priv->sd.entity);
|
||||
v4l2_ctrl_handler_free(&priv->ctrls);
|
||||
v4l2_async_unregister_subdev(&priv->sd);
|
||||
max9286_v4l2_notifier_unregister(priv);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user