Re: [PATCH 9/9] mt9t112: initialize left and top

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 3 May 2015, Guennadi Liakhovetski wrote:

> Hi Hans,
> 
> On Sun, 3 May 2015, Hans Verkuil wrote:
> 
> > From: Hans Verkuil <hans.verkuil@xxxxxxxxx>
> > 
> > The left and top variables were uninitialized, leading to unexpected
> > results.
> > 
> > Signed-off-by: Hans Verkuil <hans.verkuil@xxxxxxxxx>
> > ---
> >  drivers/media/i2c/soc_camera/mt9t112.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/media/i2c/soc_camera/mt9t112.c b/drivers/media/i2c/soc_camera/mt9t112.c
> > index de10a76..02190d6 100644
> > --- a/drivers/media/i2c/soc_camera/mt9t112.c
> > +++ b/drivers/media/i2c/soc_camera/mt9t112.c
> > @@ -952,7 +952,8 @@ static int mt9t112_set_fmt(struct v4l2_subdev *sd,
> >  	struct v4l2_mbus_framefmt *mf = &format->format;
> >  	struct i2c_client *client = v4l2_get_subdevdata(sd);
> >  	struct mt9t112_priv *priv = to_mt9t112(client);
> > -	unsigned int top, left;
> > +	unsigned int top = priv->frame.top;
> > +	unsigned int left = priv->frame.left;
> 
> I don't think this is needed. We don't care about left and top in 
> mt9t112_set_fmt().
> 
> How about my comment about a duplicated call to mt9t112_set_params()? Can 
> we have it fixed too?

Sorry, just saw your comment in patch #0:) Np, let's postpone this then.

Thanks
Guennadi
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux