@@ -714,6 +714,10 @@ v3d_get_cpu_reset_performance_params(struct drm_file *file_priv,
}
qinfo->queries[i].syncobj = drm_syncobj_find(file_priv, sync);
+ if (!qinfo->queries[i].syncobj) {
+ err = -ENOENT;
+ goto error;
+ }
}
qinfo->count = reset.count;
qinfo->nperfmons = reset.nperfmons;
@@ -795,6 +799,10 @@ v3d_get_cpu_copy_performance_query_params(struct drm_file *file_priv,
}
qinfo->queries[i].syncobj = drm_syncobj_find(file_priv, sync);
+ if (!qinfo->queries[i].syncobj) {
+ err = -ENOENT;
+ goto error;
+ }
}
qinfo->count = copy.count;
qinfo->nperfmons = copy.nperfmons;