media: max9286: Free control handler
[ Upstream commit bfce6a12e5ba1edde95126aa06778027f16115d4 ]
The control handler is leaked in some probe-time error paths, as well as
in the remove path. Fix it.
Fixes: 66d8c9d242
("media: i2c: Add MAX9286 driver")
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
052d22acd7
commit
1e9fc6c473
@ -941,6 +941,7 @@ static int max9286_v4l2_register(struct max9286_priv *priv)
|
||||
static void max9286_v4l2_unregister(struct max9286_priv *priv)
|
||||
{
|
||||
fwnode_handle_put(priv->sd.fwnode);
|
||||
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