[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <db1d7227-f9a4-42fa-89ba-b484e1260e0b@ideasonboard.com>
Date: Fri, 1 Mar 2024 10:49:19 +0200
From: Tomi Valkeinen <tomi.valkeinen@...asonboard.com>
To: Sakari Ailus <sakari.ailus@...ux.intel.com>,
Markus Elfring <Markus.Elfring@....de>
Cc: linux-media@...r.kernel.org, kernel-janitors@...r.kernel.org,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] media: i2c: ds90ub960: Delete duplicate source code in
ub960_parse_dt_rxports()
Hi,
On 01/03/2024 10:46, Sakari Ailus wrote:
> Hi Markus,
>
> On Fri, Mar 01, 2024 at 08:46:25AM +0100, Markus Elfring wrote:
>> From: Markus Elfring <elfring@...rs.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@...rs.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.
I don't like successful execution entering error paths. That's why
there's the return 0.
Tomi
>> err_put_links:
>> fwnode_handle_put(links_fwnode);
>>
>
Powered by blists - more mailing lists