diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2014-09-20 08:54:06 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2014-09-21 19:56:11 -0400 |
commit | 50394e7369d519ad0d732cb6913d2bbdf4213e2e (patch) | |
tree | 82353740de531990c8ea1c15b892f69a21199e4d | |
parent | fdc6b388925e3d0a4b4773ab7d641947fe59ed46 (diff) |
[media] cx2341x: fix kernel oops
The v4l2_ctrl_config struct must be zeroed before passing it to
v4l2_ctrl_new_custom(). This was always wrong, but with the recent
v4l2-ctrls.c changes this is now much more likely to lead to a
kernel bug.
This is the only place where this struct wasn't initialized properly.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: Pridvorov Andrey <ua0lnj@bk.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-rw-r--r-- | drivers/media/common/cx2341x.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/common/cx2341x.c b/drivers/media/common/cx2341x.c index 103ef6bad2e2..be763150b8aa 100644 --- a/drivers/media/common/cx2341x.c +++ b/drivers/media/common/cx2341x.c | |||
@@ -1490,6 +1490,7 @@ static struct v4l2_ctrl *cx2341x_ctrl_new_custom(struct v4l2_ctrl_handler *hdl, | |||
1490 | { | 1490 | { |
1491 | struct v4l2_ctrl_config cfg; | 1491 | struct v4l2_ctrl_config cfg; |
1492 | 1492 | ||
1493 | memset(&cfg, 0, sizeof(cfg)); | ||
1493 | cx2341x_ctrl_fill(id, &cfg.name, &cfg.type, &min, &max, &step, &def, &cfg.flags); | 1494 | cx2341x_ctrl_fill(id, &cfg.name, &cfg.type, &min, &max, &step, &def, &cfg.flags); |
1494 | cfg.ops = &cx2341x_ops; | 1495 | cfg.ops = &cx2341x_ops; |
1495 | cfg.id = id; | 1496 | cfg.id = id; |