[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <m3zghaeh6n.fsf@t19.piap.pl>
Date: Fri, 15 Jul 2022 13:41:52 +0200
From: Krzysztof Hałasa <khalasa@...p.pl>
To: Yang Yingliang <yangyingliang@...wei.com>
Cc: <linux-kernel@...r.kernel.org>, <linux-media@...r.kernel.org>,
<mchehab@...nel.org>
Subject: Re: [PATCH -next] media: ar0521: fix error return code in
ar0521_power_on()
Yang Yingliang <yangyingliang@...wei.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@...wei.com>
Right, thanks.
Acked-by: Krzysztof Hałasa <khalasa@...p.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
Powered by blists - more mailing lists