From: Shuah Khan <skhan@linuxfoundation.org>
To: mchehab@kernel.org, hverkuil-cisco@xs4all.nl,
sakari.ailus@linux.intel.com,
niklas.soderlund+renesas@ragnatech.se, ezequiel@collabora.com,
paul.kocialkowski@bootlin.com
Cc: Shuah Khan <skhan@linuxfoundation.org>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] media: v4l2-core: fix uninitialized variable error
Date: Wed, 5 Jun 2019 15:53:48 -0600 [thread overview]
Message-ID: <d0d1cd16f3995d8c22a5a4a0d2018482cb739354.1559764506.git.skhan@linuxfoundation.org> (raw)
In-Reply-To: <cover.1559764506.git.skhan@linuxfoundation.org>
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@linuxfoundation.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
next prev parent reply other threads:[~2019-06-05 21:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-05 21:53 [PATCH 0/2] Fixes to cppcheck errors in v4l2-ioctl.c Shuah Khan
2019-06-05 21:53 ` [PATCH 1/2] media: v4l2-core: Shifting signed 32-bit value by 31 bits error Shuah Khan
2019-06-06 3:22 ` Randy Dunlap
2019-06-06 6:33 ` Hans Verkuil
2019-06-11 19:42 ` Shuah Khan
2019-06-11 20:50 ` Hans Verkuil
2019-06-11 22:27 ` Shuah Khan
2019-06-12 23:04 ` Shuah Khan
2019-06-05 21:53 ` Shuah Khan [this message]
2019-06-06 7:48 ` [PATCH 2/2] media: v4l2-core: fix uninitialized variable error Hans Verkuil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d0d1cd16f3995d8c22a5a4a0d2018482cb739354.1559764506.git.skhan@linuxfoundation.org \
--to=skhan@linuxfoundation.org \
--cc=ezequiel@collabora.com \
--cc=hverkuil-cisco@xs4all.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=niklas.soderlund+renesas@ragnatech.se \
--cc=paul.kocialkowski@bootlin.com \
--cc=sakari.ailus@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).