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 DAF22C2BB3F for ; Wed, 15 Nov 2023 20:58:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344831AbjKOU6S (ORCPT ); Wed, 15 Nov 2023 15:58:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53012 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344679AbjKOU5j (ORCPT ); Wed, 15 Nov 2023 15:57:39 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D709E1BC for ; Wed, 15 Nov 2023 12:57:27 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4F855C4E75F; Wed, 15 Nov 2023 20:51:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1700081515; bh=I+Mp1ZqAZPT82vL+7h8XB1jJHpHXqmrAUFo0dSYA7/c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qYat4TQ2aNcczo/A6uCcpCBCQUzHYJABac+8XuE/tuax4AxBsKKrbrP98y7s9tyKp t/xlqqIc8C2iPvUWUsUU9dLR6NN6ZjFd8xkUws1tYG6iQ6Dfkv2c9qBDoJjtH1Tlkb qf4l0gazNIeAj6ytWhIaP7FN+eKJpMKjjrf8PrLY= 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 5.15 201/244] media: i2c: max9286: Fix some redundant of_node_put() calls Date: Wed, 15 Nov 2023 15:36:33 -0500 Message-ID: <20231115203600.427470170@linuxfoundation.org> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20231115203548.387164783@linuxfoundation.org> References: <20231115203548.387164783@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 5.15-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 404a03f48b976..1b9beaee6bea7 100644 --- a/drivers/media/i2c/max9286.c +++ b/drivers/media/i2c/max9286.c @@ -1231,7 +1231,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 */ @@ -1295,7 +1294,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