From: Hans Verkuil Date: Fri, 21 Feb 2014 09:16:32 +0000 (-0300) Subject: [media] v4l2-ctrls: replace BUG_ON by WARN_ON X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=c817d927b0f7c3b3c8defa7c6ce77f934ec31eb7;p=openwrt%2Fstaging%2Fblogic.git [media] v4l2-ctrls: replace BUG_ON by WARN_ON BUG_ON is unnecessarily strict. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- 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]) {