diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2023-01-15 00:46:50 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@kernel.org> | 2023-03-20 18:09:38 +0300 |
commit | bfce6a12e5ba1edde95126aa06778027f16115d4 (patch) | |
tree | 219247ec53e349a62f16f4bd51c0143873032638 /drivers/media/i2c/max9286.c | |
parent | 1968808dd1e891c63dcc4fb5b86874bc94421b6d (diff) | |
download | linux-bfce6a12e5ba1edde95126aa06778027f16115d4.tar.xz |
media: max9286: Free control handler
The control handler is leaked in some probe-time error paths, as well as
in the remove path. Fix it.
Fixes: 66d8c9d2422d ("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>
Diffstat (limited to 'drivers/media/i2c/max9286.c')
-rw-r--r-- | drivers/media/i2c/max9286.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/i2c/max9286.c b/drivers/media/i2c/max9286.c index 701038d6d19b..13a986b88588 100644 --- a/drivers/media/i2c/max9286.c +++ b/drivers/media/i2c/max9286.c @@ -1122,6 +1122,7 @@ err_async: 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); } |