summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/vdpau/surface.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/state_trackers/vdpau/surface.c')
-rw-r--r--src/gallium/state_trackers/vdpau/surface.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/state_trackers/vdpau/surface.c b/src/gallium/state_trackers/vdpau/surface.c
index 0550141b597..d418d56a26a 100644
--- a/src/gallium/state_trackers/vdpau/surface.c
+++ b/src/gallium/state_trackers/vdpau/surface.c
@@ -426,18 +426,18 @@ VdpStatus vlVdpVideoSurfaceDMABuf(VdpVideoSurface surface,
struct pipe_surface *surf;
- memset(result, 0, sizeof(*result));
- result->handle = -1;
-
if (!p_surf)
return VDP_STATUS_INVALID_HANDLE;
if (plane > 3)
return VDP_STATUS_INVALID_VALUE;
- if (result)
+ if (!result)
return VDP_STATUS_INVALID_POINTER;
+ memset(result, 0, sizeof(*result));
+ result->handle = -1;
+
pipe_mutex_lock(p_surf->device->mutex);
if (p_surf->video_buffer == NULL) {
struct pipe_context *pipe = p_surf->device->context;