From: Mats Randgaard <matra...@cisco.com>

VIDIOC_S_EDID can return error and valid result

Documentation/DocBook/media/v4l/vidioc-g-edid.xml:
"If there are more EDID blocks than the hardware can handle then
the EDID is not written, but instead the error code E2BIG is set
and blocks is set to the maximum that the hardware supports."
---
 drivers/media/v4l2-core/v4l2-ioctl.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c 
b/drivers/media/v4l2-core/v4l2-ioctl.c
index d15e167..f36c018 100644
--- a/drivers/media/v4l2-core/v4l2-ioctl.c
+++ b/drivers/media/v4l2-core/v4l2-ioctl.c
@@ -2554,9 +2554,9 @@ video_usercopy(struct file *file, unsigned int cmd, 
unsigned long arg,
                        err = -EFAULT;
                goto out_array_args;
        }
-       /* VIDIOC_QUERY_DV_TIMINGS can return an error, but still have valid
-          results that must be returned. */
-       if (err < 0 && cmd != VIDIOC_QUERY_DV_TIMINGS)
+       /* VIDIOC_QUERY_DV_TIMINGS and VIDIOC_S_EDID can return an error, but
+          still have valid results that must be returned. */
+       if (err < 0 && cmd != VIDIOC_QUERY_DV_TIMINGS && cmd != VIDIOC_S_EDID)
                goto out;
 
 out_array_args:
-- 
1.8.4.5

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to