mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: Markus Elfring <Markus.Elfring@web.de>
Cc: linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] media: i2c: ds90ub960: Delete duplicate source code in ub960_parse_dt_rxports()
Date: Fri, 1 Mar 2024 08:46:54 +0000	[thread overview]
Message-ID: <ZeGV_siWFkfqSEgZ@kekkonen.localdomain> (raw)
In-Reply-To: <79fa4854-976d-4aad-86ac-c156b0c4937e@web.de>

Hi Markus,

On Fri, Mar 01, 2024 at 08:46:25AM +0100, Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Fri, 1 Mar 2024 08:23:24 +0100
> 
> Avoid the specification of a duplicate fwnode_handle_put() call
> in this function implementation.
> 
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
>  drivers/media/i2c/ds90ub960.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/media/i2c/ds90ub960.c b/drivers/media/i2c/ds90ub960.c
> index ffe5f25f8647..eb708ed7b56e 100644
> --- a/drivers/media/i2c/ds90ub960.c
> +++ b/drivers/media/i2c/ds90ub960.c
> @@ -3486,10 +3486,7 @@ static int ub960_parse_dt_rxports(struct ub960_data *priv)
>  		}
>  	}
> 
> -	fwnode_handle_put(links_fwnode);
> -
> -	return 0;
> -
> +	ret = 0;

I think it'd be nicer to initialise ret as zero, then you can just drop the
assignment above.

>  err_put_links:
>  	fwnode_handle_put(links_fwnode);
> 

-- 
Regards,

Sakari Ailus

  reply	other threads:[~2024-03-01  8:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-01  7:46 Markus Elfring
2024-03-01  8:46 ` Sakari Ailus [this message]
2024-03-01  8:49   ` Tomi Valkeinen
2024-03-01  9:02     ` Sakari Ailus
2024-03-01 17:36       ` Andy Shevchenko
2024-03-02  9:13         ` Dan Carpenter
2024-03-02 11:25           ` Markus Elfring

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=ZeGV_siWFkfqSEgZ@kekkonen.localdomain \
    --to=sakari.ailus@linux.intel.com \
    --cc=Markus.Elfring@web.de \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=tomi.valkeinen@ideasonboard.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

all inboxes | Powered by JetHome®