[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 6 Jun 2019 09:48:16 +0200
From: Hans Verkuil <hverkuil-cisco@...all.nl>
To: Shuah Khan <skhan@...uxfoundation.org>, mchehab@...nel.org,
sakari.ailus@...ux.intel.com,
niklas.soderlund+renesas@...natech.se, ezequiel@...labora.com,
paul.kocialkowski@...tlin.com
Cc: linux-media@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] media: v4l2-core: fix uninitialized variable error
On 6/5/19 11:53 PM, Shuah Khan wrote:
> 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
This is a false report: sd is set by v4l2_device_for_each_subdev before it is used.
I'm dropping this patch.
Regards,
Hans
>
> 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) {
>
Powered by blists - more mailing lists