linux-dmabuf: Keep checking planes even if the first doesn't support lseek
authorDerek Foreman <derekf@osg.samsung.com>
Mon, 25 Apr 2016 14:23:24 +0000 (09:23 -0500)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Tue, 26 Apr 2016 08:02:06 +0000 (11:02 +0300)
If we break; when lseek fails we can fail to do some legitimate tests
on remaining planes in a multi-plane buffer.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
src/linux-dmabuf.c

index 8c6337c..78e77a2 100644 (file)
@@ -219,7 +219,7 @@ params_create(struct wl_client *client,
                 * by the kernel not supporting seeking on dmabuf */
                size = lseek(buffer->attributes.fd[i], 0, SEEK_END);
                if (size == -1)
-                       break;
+                       continue;
 
                if (buffer->attributes.offset[i] >= size) {
                        wl_resource_post_error(params_resource,