From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BAF95171A1 for ; Mon, 8 May 2023 11:34:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 36F42C433EF; Mon, 8 May 2023 11:34:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1683545652; bh=k4hX7jP1jaUprMrk24Ybn0IBbBHWDERimPlvwZ4J9NQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tgDBEH6l5/wRMY2KZsnP4f07rD7qC/3GHRYcbCxuf8prH2x6CPCqBAuSASkbFvsHc gkT86DFxskYK3GGygvaBLGMAM7BLLNSCnam7VBgnh5Bn9biEC1FIYYYWBZ2vJYl9gI d0hjCksAott2gFXDTwKINAWPeRoe4IV9Woh61iTA= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Laurent Pinchart , =?UTF-8?q?Niklas=20S=C3=B6derlund?= , Jacopo Mondi , Sakari Ailus , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 5.15 110/371] media: max9286: Free control handler Date: Mon, 8 May 2023 11:45:11 +0200 Message-Id: <20230508094816.372525632@linuxfoundation.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230508094811.912279944@linuxfoundation.org> References: <20230508094811.912279944@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Laurent Pinchart [ Upstream commit bfce6a12e5ba1edde95126aa06778027f16115d4 ] 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 Reviewed-by: Niklas Söderlund Reviewed-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/i2c/max9286.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/i2c/max9286.c b/drivers/media/i2c/max9286.c index b9513e93ac617..404a03f48b976 100644 --- a/drivers/media/i2c/max9286.c +++ b/drivers/media/i2c/max9286.c @@ -937,6 +937,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); } -- 2.39.2