[media] saa7164: fix compiler warning
authorHans Verkuil <hans.verkuil@cisco.com>
Fri, 21 Jun 2013 19:16:47 +0000 (16:16 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 28 Jun 2013 18:07:37 +0000 (15:07 -0300)
build/media_build/v4l/saa7164-core.c: In function 'saa7164_initdev':
build/media_build/v4l/saa7164-core.c:1192:6: warning: 'err' may be used uninitialized in this function [-Wmaybe-uninitialized]
  int err, i;
        ^

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/pci/saa7164/saa7164-core.c

index 5d27865..d37ee37 100644 (file)
@@ -1196,7 +1196,8 @@ static int saa7164_initdev(struct pci_dev *pci_dev,
        if (NULL == dev)
                return -ENOMEM;
 
-       if (v4l2_device_register(&pci_dev->dev, &dev->v4l2_dev)) {
+       err = v4l2_device_register(&pci_dev->dev, &dev->v4l2_dev);
+       if (err < 0) {
                dev_err(&pci_dev->dev, "v4l2_device_register failed\n");
                goto fail_free;
        }