Re: drivers/media/i2c/imx290.c

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

 



Hi Laurent,

On Thu, Jun 08, 2023 at 05:41:46PM +0300, Laurent Pinchart wrote:
> Hi Tommaso,
> 
> On Thu, Jun 08, 2023 at 04:14:22PM +0200, Tommaso Merciai wrote:
> > 
> > Hello Manivannan/Laurent,
> > 
> > Theme is: drivers/media/i2c/imx290.c
> > 
> > 
> > Taking this driver as reference for some part of the Alvium
> > driver I found some doubts:
> > 
> > 1)----------------
> > 
> > 
> > Into imx290_set_stream
> > 
> > Lock is taken using:
> > 
> > state = v4l2_subdev_lock_and_get_active_state(sd);
> > 
> > but v4l2_subdev_unlock_state is never called except
> > that something fail during the stream_on.
> > This not cause a deadlock in your side?
> > I'm missing something?
> 
> The state is unlocked at the end of the function:
> 
> unlock:
> 	v4l2_subdev_unlock_state(state);
> 	return ret;
> 
> This code path is taken in the success case too, not only the error
> cases.

I miss that there is no return
before unlock.

Thanks for clarify this! :)

Regards,
Tommaso

> 
> > 2)----------------
> > 
> > imx290_ctrl_update has format param that is never used,
> > or I'm wrong?
> 
> Indeed, the argument isn't used, it could be dropped.

Oooks.

> 
> > -----------------
> > 
> > Thanks in advance for clarify this! :)
> 
> -- 
> Regards,
> 
> Laurent Pinchart



[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