lkml.org 
[lkml]   [2023]   [Apr]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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@wanadoo.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

\
 
 \ /
  Last update: 2023-04-17 12:04    [W:0.032 / U:1.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site