aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Verkuil2014-02-21 06:16:32 -0300
committerMauro Carvalho Chehab2014-03-11 09:22:22 -0300
commitc817d927b0f7c3b3c8defa7c6ce77f934ec31eb7 (patch)
tree6a1506f13bb21482178a68b43802f4273d20310c
parent9b05837352e7c90b5af81fb7a5e499e91d376ee0 (diff)
[media] v4l2-ctrls: replace BUG_ON by WARN_ON
BUG_ON is unnecessarily strict. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-rw-r--r--drivers/media/v4l2-core/v4l2-ctrls.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c
index 1168f683fd48..5c3e8ca9b1d1 100644
--- a/drivers/media/v4l2-core/v4l2-ctrls.c
+++ b/drivers/media/v4l2-core/v4l2-ctrls.c
@@ -1942,7 +1942,8 @@ void v4l2_ctrl_cluster(unsigned ncontrols, struct v4l2_ctrl **controls)
int i;
/* The first control is the master control and it must not be NULL */
- BUG_ON(ncontrols == 0 || controls[0] == NULL);
+ if (WARN_ON(ncontrols == 0 || controls[0] == NULL))
+ return;
for (i = 0; i < ncontrols; i++) {
if (controls[i]) {