On Thu, Mar 19, 2020 at 10:16:30AM +0100, Michael Tretter wrote: > Since commit cc62c74749a3 ("media: allegro: add missed checks in > allegro_open()") the allegro device does provide v4l2 controls to user > space anymore. The reason is that v4l2_fh_init() initializes > fh->ctrl_handler to vdev->ctrl_handler, which invalidates the previous > driver override of the ctrl_handler. > > Therefore, v4l2_fh_init() must be called before the driver overrides the > fh->ctrl_handler with its own handler. > > Move the initialization of the fh back to the top, as the initialization > does not does not need to be reverted on errors, but it is enough to > free the channel. Gentle ping. Michael > > Fixes: cc62c74749a3 ("media: allegro: add missed checks in allegro_open()") > Signed-off-by: Michael Tretter <m.tretter@xxxxxxxxxxxxxx> > --- > drivers/staging/media/allegro-dvt/allegro-core.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/staging/media/allegro-dvt/allegro-core.c b/drivers/staging/media/allegro-dvt/allegro-core.c > index cb6bdabaaff3..761f2c7ff8e7 100644 > --- a/drivers/staging/media/allegro-dvt/allegro-core.c > +++ b/drivers/staging/media/allegro-dvt/allegro-core.c > @@ -2467,6 +2467,8 @@ static int allegro_open(struct file *file) > if (!channel) > return -ENOMEM; > > + v4l2_fh_init(&channel->fh, vdev); > + > init_completion(&channel->completion); > INIT_LIST_HEAD(&channel->source_shadow_list); > INIT_LIST_HEAD(&channel->stream_shadow_list); > @@ -2588,7 +2590,6 @@ static int allegro_open(struct file *file) > goto error; > } > > - v4l2_fh_init(&channel->fh, vdev); > file->private_data = &channel->fh; > v4l2_fh_add(&channel->fh); > > -- > 2.20.1 > >