From patchwork Fri Aug 25 22:13:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 13366377 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 1D855EE49B4 for ; Fri, 25 Aug 2023 22:15:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230056AbjHYWOf (ORCPT ); Fri, 25 Aug 2023 18:14:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230215AbjHYWOJ (ORCPT ); Fri, 25 Aug 2023 18:14:09 -0400 Received: from smtp.smtpout.orange.fr (smtp-30.smtpout.orange.fr [80.12.242.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9BC932711 for ; Fri, 25 Aug 2023 15:13:52 -0700 (PDT) Received: from pop-os.home ([86.243.2.178]) by smtp.orange.fr with ESMTPA id Zf3sqGJVgADjwZf3sq3hFV; Sat, 26 Aug 2023 00:13:50 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1693001630; bh=Vbo5vzDX7vXJX6v/iiFgU/SzjBJx25qCoIqU0bH1fO0=; h=From:To:Cc:Subject:Date; b=OrQuGg2RhxTMxjxNifXtxC0fGgWsbJ8gPJ+m5RM7Xl3nJeQlKZ00dkX5VWWXY4d91 GZx0x+194k3bU3NEjwXkIOEpftqUtmrsYUCI1RScVvNHXWaJD5OytrkGcZSjeW1iTv /TGq7ZWgYCjdayw4vGHys55WGcs6Z6p2K3ycSq+253GCYNnbeaTz8S+siB/CudvK7p yus6FBf+nsSVqGM7JBDI8Ug0BvDSZlw4/vFP2U5W48N9kS1XOjmg7OPMXZLO2ImAaD RjcJxOk7LLS4GgDdqgyW6tjJgeBcDa0l8YB5kZ51ogQzZx/f5c7HRdstKEXFP1QDJb R2pA6migAjLbQ== X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sat, 26 Aug 2023 00:13:50 +0200 X-ME-IP: 86.243.2.178 From: Christophe JAILLET To: Jacopo Mondi , Kieran Bingham , Laurent Pinchart , =?utf-8?q?Nik?= =?utf-8?q?las_S=C3=B6derlund?= , Mauro Carvalho Chehab , Sakari Ailus Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , Mauro Carvalho Chehab , linux-media@vger.kernel.org Subject: [PATCH] media: i2c: max9286: Fix some redundant of_node_put() calls Date: Sat, 26 Aug 2023 00:13:40 +0200 Message-Id: <084fdd562690c08f1ee72bc08e63e8ee576dc86a.1693001599.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org 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: Kieran Bingham Reviewed-by: Laurent Pinchart --- /!\ This patch is speculative, review with case /!\ --- 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 20e7c7cf5eeb..f27a69b1b727 100644 --- a/drivers/media/i2c/max9286.c +++ b/drivers/media/i2c/max9286.c @@ -1450,7 +1450,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 */ @@ -1514,7 +1513,6 @@ static int max9286_parse_dt(struct max9286_priv *priv) priv->source_mask |= BIT(ep.port); priv->nsources++; } - of_node_put(node); of_property_read_u32(dev->of_node, "maxim,bus-width", &priv->bus_width); switch (priv->bus_width) {