mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Krzysztof Hałasa" <khalasa@piap.pl>
To: Yang Yingliang <yangyingliang@huawei.com>
Cc: <linux-kernel@vger.kernel.org>, <linux-media@vger.kernel.org>,
	<mchehab@kernel.org>
Subject: Re: [PATCH -next] media: ar0521: fix error return code in ar0521_power_on()
Date: Fri, 15 Jul 2022 13:41:52 +0200	[thread overview]
Message-ID: <m3zghaeh6n.fsf@t19.piap.pl> (raw)
In-Reply-To: <20220715085924.1881607-1-yangyingliang@huawei.com> (Yang Yingliang's message of "Fri, 15 Jul 2022 16:59:24 +0800")

Yang Yingliang <yangyingliang@huawei.com> writes:

> Return error code if ar0521_write_regs() fails in ar0521_power_on().
>
> Fixes: 852b50aeed15 ("media: On Semi AR0521 sensor driver")
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>

Right, thanks.

Acked-by: Krzysztof Hałasa <khalasa@piap.pl>

> +++ b/drivers/media/i2c/ar0521.c
> @@ -757,8 +757,9 @@ static int ar0521_power_on(struct device *dev)
>  	usleep_range(4500, 5000); /* min 45000 clocks */
>  
>  	for (cnt = 0; cnt < ARRAY_SIZE(initial_regs); cnt++)
> -		if (ar0521_write_regs(sensor, initial_regs[cnt].data,
> -				      initial_regs[cnt].count))
> +		ret = ar0521_write_regs(sensor, initial_regs[cnt].data,
> +					initial_regs[cnt].count);
> +		if (ret)
>  			goto off;

-- 
Krzysztof "Chris" Hałasa

Sieć Badawcza Łukasiewicz
Przemysłowy Instytut Automatyki i Pomiarów PIAP
Al. Jerozolimskie 202, 02-486 Warszawa

      reply	other threads:[~2022-07-15 11:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-15  8:59 Yang Yingliang
2022-07-15 11:41 ` Krzysztof Hałasa [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=m3zghaeh6n.fsf@t19.piap.pl \
    --to=khalasa@piap.pl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=yangyingliang@huawei.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®