media: controls: Add validate failure debug message
[linux-2.6-microblaze.git] / drivers / media / v4l2-core / v4l2-ctrls.c
index 7febfbb..3979e79 100644 (file)
@@ -4112,8 +4112,13 @@ static int try_set_ext_ctrls_common(struct v4l2_fh *fh,
                        struct v4l2_ctrl *ctrl = helpers[idx].ref->ctrl;
 
                        ret = user_to_new(cs->controls + idx, ctrl);
-                       if (!ret && ctrl->is_ptr)
+                       if (!ret && ctrl->is_ptr) {
                                ret = validate_new(ctrl, ctrl->p_new);
+                               if (ret)
+                                       dprintk(vdev,
+                                               "failed to validate control %s (%d)\n",
+                                               v4l2_ctrl_get_name(ctrl->id), ret);
+                       }
                        idx = helpers[idx].next;
                } while (!ret && idx);