@@ -1749,8 +1749,10 @@ i915_gem_request_remove_from_client(struct drm_i915_gem_request *request)
return;
spin_lock(&file_priv->mm.lock);
- list_del(&request->client_list);
- request->file_priv = NULL;
+ if (request->file_priv) {
+ list_del(&request->client_list);
+ request->file_priv = NULL;
+ }
spin_unlock(&file_priv->mm.lock);
}
@@ -4043,8 +4045,10 @@ void i915_gem_release(struct drm_device *dev, struct drm_file *file)
request = list_first_entry(&file_priv->mm.request_list,
struct drm_i915_gem_request,
client_list);
- list_del(&request->client_list);
- request->file_priv = NULL;
+ if (request->file_priv) {
+ list_del(&request->client_list);
+ request->file_priv = NULL;
+ }
}
spin_unlock(&file_priv->mm.lock);
}