Skip to content

Commit 19f3620

Browse files
pinchartlgregkh
authored andcommitted
media: max9286: Free control handler
[ Upstream commit bfce6a1 ] The control handler is leaked in some probe-time error paths, as well as in the remove path. Fix it. Fixes: 66d8c9d ("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>
1 parent eeda150 commit 19f3620

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/media/i2c/max9286.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1122,6 +1122,7 @@ static int max9286_v4l2_register(struct max9286_priv *priv)
11221122
static void max9286_v4l2_unregister(struct max9286_priv *priv)
11231123
{
11241124
fwnode_handle_put(priv->sd.fwnode);
1125+
v4l2_ctrl_handler_free(&priv->ctrls);
11251126
v4l2_async_unregister_subdev(&priv->sd);
11261127
max9286_v4l2_notifier_unregister(priv);
11271128
}

0 commit comments

Comments
 (0)