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-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <d0d1cd16f3995d8c22a5a4a0d2018482cb739354.1559764506.git.skhan@linuxfoundation.org>
Date:   Wed,  5 Jun 2019 15:53:48 -0600
From:   Shuah Khan <skhan@...uxfoundation.org>
To:     mchehab@...nel.org, hverkuil-cisco@...all.nl,
        sakari.ailus@...ux.intel.com,
        niklas.soderlund+renesas@...natech.se, ezequiel@...labora.com,
        paul.kocialkowski@...tlin.com
Cc:     Shuah Khan <skhan@...uxfoundation.org>,
        linux-media@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 2/2] media: v4l2-core: fix uninitialized variable error

Fix the following cppcheck error:

Checking drivers/media/v4l2-core/v4l2-ioctl.c ...
Checking drivers/media/v4l2-core/v4l2-ioctl.c: CONFIG_VIDEO_ADV_DEBUG...
[drivers/media/v4l2-core/v4l2-ioctl.c:2470]: (error) Uninitialized variable: sd

Signed-off-by: Shuah Khan <skhan@...uxfoundation.org>
---
 drivers/media/v4l2-core/v4l2-ioctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c
index 333e387bafeb..205addb949ce 100644
--- a/drivers/media/v4l2-core/v4l2-ioctl.c
+++ b/drivers/media/v4l2-core/v4l2-ioctl.c
@@ -2445,7 +2445,7 @@ static int v4l_dbg_g_chip_info(const struct v4l2_ioctl_ops *ops,
 #ifdef CONFIG_VIDEO_ADV_DEBUG
 	struct video_device *vfd = video_devdata(file);
 	struct v4l2_dbg_chip_info *p = arg;
-	struct v4l2_subdev *sd;
+	struct v4l2_subdev *sd = NULL;
 	int idx = 0;
 
 	switch (p->match.type) {
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ