[media] v4l2-ioctl: Give more information when device_caps are missing
[firefly-linux-kernel-4.4.55.git] / drivers / media / v4l2-core / v4l2-ioctl.c
index 85de4557f6961e3a9c36015b69534687d13cfbc0..ad7e929179ba4fb1910c44ae0ed6eabf864391a0 100644 (file)
@@ -1025,8 +1025,9 @@ static int v4l_querycap(const struct v4l2_ioctl_ops *ops,
         * Drivers MUST fill in device_caps, so check for this and
         * warn if it was forgotten.
         */
-       WARN_ON(!(cap->capabilities & V4L2_CAP_DEVICE_CAPS) ||
-               !cap->device_caps);
+       WARN(!(cap->capabilities & V4L2_CAP_DEVICE_CAPS) ||
+               !cap->device_caps, "Bad caps for driver %s, %x %x",
+               cap->driver, cap->capabilities, cap->device_caps);
        cap->device_caps |= V4L2_CAP_EXT_PIX_FORMAT;
 
        return ret;