]> git.karo-electronics.de Git - karo-tx-linux.git/commit
[media] v4l2-ctrls.c: add NULL check
authorHans Verkuil <hverkuil@xs4all.nl>
Wed, 25 Jan 2017 07:38:07 +0000 (05:38 -0200)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Fri, 3 Feb 2017 13:24:48 +0000 (11:24 -0200)
commit814e92b8cadf73ee79f689ec48f64408f3904d19
treee9829d147922ab3ce6231b4366287a211b67175a
parent75d1b1379fba4ca2fb6fb7b70141ac0afb807fbf
[media] v4l2-ctrls.c: add NULL check

Check that the control whose events we want to delete is still there.

Normally this will always be the case, but I am not 100% certain if
there aren't any corner cases when a device is forcibly unbound.

In any case, this will satisfy static checkers and simply make it more
robust.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: Shaobo <shaobo@cs.utah.edu>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/v4l2-core/v4l2-ctrls.c