[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZD0YrkVOoxPL7TrB@kekkonen.localdomain>
Date: Mon, 17 Apr 2023 13:00:14 +0300
From: Sakari Ailus <sakari.ailus@...ux.intel.com>
To: Laurent Pinchart <laurent.pinchart@...asonboard.com>
Cc: Christophe JAILLET <christophe.jaillet@...adoo.fr>,
Manivannan Sadhasivam <mani@...nel.org>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
linux-media@...r.kernel.org
Subject: Re: [PATCH] media: i2c: imx296: Fix error handling while reading
temperature
Hi Laurent,
On Mon, Apr 17, 2023 at 08:30:59AM +0300, Laurent Pinchart wrote:
> Hi Christophe,
>
> Thank you for the patch.
>
> On Mon, Apr 17, 2023 at 12:14:42AM +0200, Christophe JAILLET wrote:
> > If imx296_read() returns an error, its returned value is a negative value.
> > But because of the "& IMX296_TMDOUT_MASK" (i.e. 0x3ff), 'tmdout' can't be
> > negative.
> >
> > So the error handling does not work as expected and a wrong value is used
> > to compute the temperature.
> >
> > Apply the IMX296_TMDOUT_MASK mask after checking for errors to fix it.
> >
> > Fixes: cb33db2b6ccf ("media: i2c: IMX296 camera sensor driver")
> > Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
>
> Dan Carpenter has submitted the same fix in
> https://lore.kernel.org/linux-media/Y%2FYf19AE78jn5YW7@kili/. Sakari,
> could you please pick it up ?
Oops, thanks for notifying me. This slipped from my hands somehow. It's in
my tree now.
--
Sakari Ailus
Powered by blists - more mailing lists