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>
This commit is contained in:
parent
ecbce48f1f
commit
0fb68ce02a
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue