lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 23 Jul 2007 10:02:03 +0200
From:	Adrian Bunk <bunk@...sta.de>
To:	Thierry MERLE <thierry.merle@...e.fr>,
	"Dwaine P. Garden" <dwainegarden@...ers.com>,
	Mauro Carvalho Chehab <mchehab@...radead.org>
Cc:	v4l-dvb-maintainer@...uxtv.org, linux-kernel@...r.kernel.org,
	Michal Piotrowski <michal.k.k.piotrowski@...il.com>
Subject: [2.6.23 regression fix] usbvision: don't return an uninitialized
	value

Commit c5f48367fe54c46805774eeea8e828de54a5ad7b introduced this return 
of an uninitialized variable.

Spotted by the Coverity checker.

Signed-off-by: Adrian Bunk <bunk@...sta.de>

---

 drivers/media/video/usbvision/usbvision-video.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

--- linux-2.6.22-rc6-mm1/drivers/media/video/usbvision/usbvision-video.c.old	2007-07-23 01:45:01.000000000 +0200
+++ linux-2.6.22-rc6-mm1/drivers/media/video/usbvision/usbvision-video.c	2007-07-23 01:46:06.000000000 +0200
@@ -525,18 +525,17 @@ static int vidioc_s_register (struct fil
 {
 	struct video_device *dev = video_devdata(file);
 	struct usb_usbvision *usbvision =
 		(struct usb_usbvision *) video_get_drvdata(dev);
-	int errCode;
 
 	if (!v4l2_chip_match_host(reg->match_type, reg->match_chip))
 		return -EINVAL;
 	/* NT100x has a 8-bit register space */
 	reg->val = (u8)usbvision_write_reg(usbvision, reg->reg&0xff, reg->val);
 	if (reg->val < 0) {
 		err("%s: VIDIOC_DBG_S_REGISTER failed: error %d",
-		    __FUNCTION__, errCode);
-		return errCode;
+		    __FUNCTION__, reg->val);
+		return reg->val;
 	}
 	return 0;
 }
 #endif

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ