aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/pci/tw686x/tw686x-video.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2018-10-01 12:15:41 +0100
committerMark Brown <broonie@kernel.org>2018-10-01 12:15:41 +0100
commit5410a50744229bec3b4a182ff1d6e847957014c2 (patch)
treec2e1f0042238961ec43a2ca88d6d366dc80436f1 /drivers/media/pci/tw686x/tw686x-video.c
parentd7b33ebae7c1419ebdfd94eb64bf74a7ec760031 (diff)
parent3b65f403d7d0e98484e8f2c9471808f2785a8235 (diff)
Merge tag 'v4.14.73' into linux-linaro-lsk-v4.14lsk-v4.14-18.09
This is the 4.14.73 stable release # gpg: Signature made Sat 29 Sep 2018 11:06:11 BST # gpg: using RSA key 647F28654894E3BD457199BE38DBBDC86092693E # gpg: Good signature from "Greg Kroah-Hartman <gregkh@linuxfoundation.org>" [unknown] # gpg: aka "Greg Kroah-Hartman (Linux kernel stable release signing key) <greg@kroah.com>" [unknown] # gpg: aka "Greg Kroah-Hartman <gregkh@kernel.org>" [unknown] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 647F 2865 4894 E3BD 4571 99BE 38DB BDC8 6092 693E
Diffstat (limited to 'drivers/media/pci/tw686x/tw686x-video.c')
-rw-r--r--drivers/media/pci/tw686x/tw686x-video.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/media/pci/tw686x/tw686x-video.c b/drivers/media/pci/tw686x/tw686x-video.c
index 0ea8dd44026c..3a06c000f97b 100644
--- a/drivers/media/pci/tw686x/tw686x-video.c
+++ b/drivers/media/pci/tw686x/tw686x-video.c
@@ -1190,6 +1190,14 @@ int tw686x_video_init(struct tw686x_dev *dev)
return err;
}
+ /* Initialize vc->dev and vc->ch for the error path */
+ for (ch = 0; ch < max_channels(dev); ch++) {
+ struct tw686x_video_channel *vc = &dev->video_channels[ch];
+
+ vc->dev = dev;
+ vc->ch = ch;
+ }
+
for (ch = 0; ch < max_channels(dev); ch++) {
struct tw686x_video_channel *vc = &dev->video_channels[ch];
struct video_device *vdev;
@@ -1198,9 +1206,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)