public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: "Jacopo Mondi" <jacopo+renesas@jmondi.org>,
	"Kieran Bingham" <kieran.bingham+renesas@ideasonboard.com>,
	"Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>,
	"Mauro Carvalho Chehab" <mchehab@kernel.org>,
	"Sakari Ailus" <sakari.ailus@linux.intel.com>,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
	"Mauro Carvalho Chehab" <mchehab+huawei@kernel.org>,
	linux-media@vger.kernel.org
Subject: Re: [PATCH] media: i2c: max9286: Fix some redundant of_node_put() calls
Date: Mon, 28 Aug 2023 13:59:54 +0300	[thread overview]
Message-ID: <20230828105954.GG14596@pendragon.ideasonboard.com> (raw)
In-Reply-To: <084fdd562690c08f1ee72bc08e63e8ee576dc86a.1693001599.git.christophe.jaillet@wanadoo.fr>

Hi Christophe,

Thank you for the patch.

On Sat, Aug 26, 2023 at 12:13:40AM +0200, Christophe JAILLET wrote:
> 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 <christophe.jaillet@wanadoo.fr>

Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

> ---
> /!\  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) {

-- 
Regards,

Laurent Pinchart

      parent reply	other threads:[~2023-08-28 11:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-25 22:13 [PATCH] media: i2c: max9286: Fix some redundant of_node_put() calls Christophe JAILLET
2023-08-28  7:34 ` Jacopo Mondi
2023-08-28 10:51   ` Kieran Bingham
2023-08-28 10:59 ` Laurent Pinchart [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230828105954.GG14596@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=jacopo+renesas@jmondi.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kieran.bingham+renesas@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab+huawei@kernel.org \
    --cc=mchehab@kernel.org \
    --cc=niklas.soderlund+renesas@ragnatech.se \
    --cc=sakari.ailus@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox