v4l2-ctrls: replace BUG_ON by WARN_ON
PATCH 1/1 v4l2-ctrls: replace BUG_ON by WARN_ON
BUG_ON is unnecessarily strict.
Signed-off-by Hans Verkuil <[email protected]>
--- drivers/media/v4l2-core/v4l2-ctrls.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/media/v4l2-core/v4l2-ctrls.c +2 -1
@@ -1921,7 +1921,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]) {
Signature · 1 line
1.9.0