Hi Krzysztof, On 10 May 2017 at 06:51, Krzysztof Hałasa <khalasa@xxxxxxx> wrote: > Signed-off-by: Krzysztof Hałasa <khalasa@xxxxxxx> > > diff --git a/drivers/media/pci/tw686x/tw686x-video.c b/drivers/media/pci/tw686x/tw686x-video.c > index c3fafa9..d637f47 100644 > --- a/drivers/media/pci/tw686x/tw686x-video.c > +++ b/drivers/media/pci/tw686x/tw686x-video.c > @@ -1190,6 +1190,13 @@ int tw686x_video_init(struct tw686x_dev *dev) > return err; > } > > + /* Initialize vc->dev and vc->ch for the error path first */ > + for (ch = 0; ch < max_channels(dev); ch++) { > + struct tw686x_video_channel *vc = &dev->video_channels[ch]; > + vc->dev = dev; > + vc->ch = ch; > + } > + I'm not sure where is the oops this commit fixes, care to explain it to me? > for (ch = 0; ch < max_channels(dev); ch++) { > struct tw686x_video_channel *vc = &dev->video_channels[ch]; > struct video_device *vdev; > @@ -1198,9 +1205,6 @@ int tw686x_video_init(struct tw686x_dev *dev) > spin_lock_init(&vc->qlock); > INIT_LIST_HEAD(&vc->vidq_queued); > > - vc->dev = dev; > - vc->ch = ch; > - > /* default settings */ > err = tw686x_set_standard(vc, V4L2_STD_NTSC); > if (err) Thanks, -- Ezequiel García, VanguardiaSur www.vanguardiasur.com.ar