mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>,
	Colin Ian King <colin.i.king@gmail.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] media: i2c: ds90ub960: Fix missing return check on ub960_rxport_read call
Date: Thu, 3 Oct 2024 15:52:17 +0300	[thread overview]
Message-ID: <f1e973fd-9933-49ed-8f9c-71b8283e6fb8@ideasonboard.com> (raw)
In-Reply-To: <Zv40EQSR__JDN_0M@kekkonen.localdomain>

Hi,

On 03/10/2024 09:05, Sakari Ailus wrote:
> Hi Colin,
> 
> On Wed, Oct 02, 2024 at 05:53:29PM +0100, Colin Ian King wrote:
>> The function ub960_rxport_read is being called and afterwards ret is
>> being checked for any failures, however ret is not being assigned to
>> the return of the function call. Fix this by assigning ret to the
>> return of the call which appears to be missing.
>>
>> Fixes: afe267f2d368 ("media: i2c: add DS90UB960 driver")
>> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
>> ---
>>   drivers/media/i2c/ds90ub960.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/media/i2c/ds90ub960.c b/drivers/media/i2c/ds90ub960.c
>> index ffe5f25f8647..58424d8f72af 100644
>> --- a/drivers/media/i2c/ds90ub960.c
>> +++ b/drivers/media/i2c/ds90ub960.c
>> @@ -1286,7 +1286,7 @@ static int ub960_rxport_get_strobe_pos(struct ub960_data *priv,
>>   
>>   	clk_delay += v & UB960_IR_RX_ANA_STROBE_SET_CLK_DELAY_MASK;
>>   
>> -	ub960_rxport_read(priv, nport, UB960_RR_SFILTER_STS_1, &v);
>> +	ret = ub960_rxport_read(priv, nport, UB960_RR_SFILTER_STS_1, &v);
>>   	if (ret)
>>   		return ret;
>>   
> 
> There seems to be a similar issues all around the driver. It'd be good to
> fix them at the same time.

With similar issues, do you mean the code not checking the return value 
at all for i2c reads and writes?

In this particular case the code already checks the return value, but 
setting the return value was missing. With a quick browse, I didn't see 
other like this.

  Tomi


  reply	other threads:[~2024-10-03 12:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-02 16:53 Colin Ian King
2024-10-03  6:05 ` Sakari Ailus
2024-10-03 12:52   ` Tomi Valkeinen [this message]
2024-10-03 13:19     ` Sakari Ailus
2024-10-03 13:33       ` Tomi Valkeinen
2024-10-03 15:13         ` Sakari Ailus
2024-10-04 15:11 ` Tomi Valkeinen
2024-10-16  7:41 ` Mauro Carvalho Chehab
2024-10-16 13:39   ` Dan Carpenter

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=f1e973fd-9933-49ed-8f9c-71b8283e6fb8@ideasonboard.com \
    --to=tomi.valkeinen@ideasonboard.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=colin.i.king@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --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

all inboxes | Powered by JetHome®