From: Hans Verkuil Date: Fri, 21 Jun 2013 19:16:47 +0000 (-0300) Subject: [media] saa7164: fix compiler warning X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=fd8d30bf20db099eec4d7f7e678e6d6fa8e492b7;p=linux-beck.git [media] saa7164: fix compiler warning 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 Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/pci/saa7164/saa7164-core.c b/drivers/media/pci/saa7164/saa7164-core.c index 5d27865784c5..d37ee37aaefe 100644 --- a/drivers/media/pci/saa7164/saa7164-core.c +++ b/drivers/media/pci/saa7164/saa7164-core.c @@ -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; }