summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYizhuo <yzhai003@ucr.edu>2019-08-26 20:55:28 -0300
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2019-08-29 10:22:39 -0300
commit0fb68ce02ae73626a61b8d03eab1625021057af5 (patch)
treefe6e473c763090df774b9b4437fcb18e809a42bb
parentecbce48f1ff2442371ebcd12ec0ecddb431fbd72 (diff)
downloadlinux-0-day-0fb68ce02ae73626a61b8d03eab1625021057af5.tar.gz
linux-0-day-0fb68ce02ae73626a61b8d03eab1625021057af5.tar.xz
media: pvrusb2: qctrl.flag will be uninitlaized if cx2341x_ctrl_query() returns error code
Inside function ctrl_cx2341x_getv4lflags(), qctrl.flag will be uninitlaized if cx2341x_ctrl_query() returns -EINVAL. However, it will be used in the later if statement, which is potentially unsafe. Signed-off-by: Yizhuo <yzhai003@ucr.edu> Acked-by: Mike Isely <isely@pobox.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
-rw-r--r--drivers/media/usb/pvrusb2/pvrusb2-hdw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/usb/pvrusb2/pvrusb2-hdw.c b/drivers/media/usb/pvrusb2/pvrusb2-hdw.c
index 2a946cff84b7d..1cfb7cf64131a 100644
--- a/drivers/media/usb/pvrusb2/pvrusb2-hdw.c
+++ b/drivers/media/usb/pvrusb2/pvrusb2-hdw.c
@@ -784,7 +784,7 @@ static int ctrl_cx2341x_set(struct pvr2_ctrl *cptr,int m,int v)
static unsigned int ctrl_cx2341x_getv4lflags(struct pvr2_ctrl *cptr)
{
- struct v4l2_queryctrl qctrl;
+ struct v4l2_queryctrl qctrl = {};
struct pvr2_ctl_info *info;
qctrl.id = cptr->info->v4l_id;
cx2341x_ctrl_query(&cptr->hdw->enc_ctl_state,&qctrl);