From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C831CC072A2 for ; Wed, 15 Nov 2023 20:00:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344108AbjKOUAj (ORCPT ); Wed, 15 Nov 2023 15:00:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47242 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344129AbjKOUAh (ORCPT ); Wed, 15 Nov 2023 15:00:37 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DFDC61A5 for ; Wed, 15 Nov 2023 12:00:32 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 59FAEC433BA; Wed, 15 Nov 2023 20:00:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1700078432; bh=XXxhGFX5dLbUThztvpX5LaB6P8C5n0H4GIhr52QQ6Bo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iiN8Fja5Sv1X1tyYqhqJ2d34hcPrXH4US+N7vXNXwirVXoHucKqw+4M36/i4VmEFn bDPRDRgZCBMEKaPkVsj9PBoqJng7CzuOUEYj49/M97XIBEbvqrML/VRBLrWmssZ785 d64+MYLgjELwrNchZAbzsmtyafy3QBR2fN8cSXr0= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Christophe JAILLET , Jacopo Mondi , Laurent Pinchart , Kieran Bingham , Sakari Ailus , Hans Verkuil , Sasha Levin Subject: [PATCH 6.1 318/379] media: i2c: max9286: Fix some redundant of_node_put() calls Date: Wed, 15 Nov 2023 14:26:33 -0500 Message-ID: <20231115192703.959757172@linuxfoundation.org> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20231115192645.143643130@linuxfoundation.org> References: <20231115192645.143643130@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Christophe JAILLET [ Upstream commit 0822315e46b400f611cba1193456ee6a5dc3e41d ] This is odd to have a of_node_put() just after a for_each_child_of_node() or a for_each_endpoint_of_node() loop. It should already be called during the last iteration. Remove these calls. Fixes: 66d8c9d2422d ("media: i2c: Add MAX9286 driver") Signed-off-by: Christophe JAILLET Reviewed-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Reviewed-by: Kieran Bingham Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Sasha Levin --- drivers/media/i2c/max9286.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/media/i2c/max9286.c b/drivers/media/i2c/max9286.c index 892cd97b7cab7..e8c28902d97e9 100644 --- a/drivers/media/i2c/max9286.c +++ b/drivers/media/i2c/max9286.c @@ -1234,7 +1234,6 @@ static int max9286_parse_dt(struct max9286_priv *priv) i2c_mux_mask |= BIT(id); } - of_node_put(node); of_node_put(i2c_mux); /* Parse the endpoints */ @@ -1298,7 +1297,6 @@ static int max9286_parse_dt(struct max9286_priv *priv) priv->source_mask |= BIT(ep.port); priv->nsources++; } - of_node_put(node); /* * Parse the initial value of the reverse channel amplitude from -- 2.42.0