Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 50394e73 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab
Browse files

[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: default avatarHans Verkuil <hans.verkuil@cisco.com>
Reported-by: default avatarPridvorov Andrey <ua0lnj@bk.ru>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent fdc6b388
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1490,6 +1490,7 @@ static struct v4l2_ctrl *cx2341x_ctrl_new_custom(struct v4l2_ctrl_handler *hdl,
{
	struct v4l2_ctrl_config cfg;

	memset(&cfg, 0, sizeof(cfg));
	cx2341x_ctrl_fill(id, &cfg.name, &cfg.type, &min, &max, &step, &def, &cfg.flags);
	cfg.ops = &cx2341x_ops;
	cfg.id = id;