aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/vmwgfx/vmwgfx_shader.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_shader.c')
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_shader.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_shader.c b/drivers/gpu/drm/vmwgfx/vmwgfx_shader.c
index 217d941b8176..ee3856578a12 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_shader.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_shader.c
@@ -371,13 +371,13 @@ int vmw_shader_destroy_ioctl(struct drm_device *dev, void *data,
371 TTM_REF_USAGE); 371 TTM_REF_USAGE);
372} 372}
373 373
374int vmw_shader_alloc(struct vmw_private *dev_priv, 374static int vmw_shader_alloc(struct vmw_private *dev_priv,
375 struct vmw_dma_buffer *buffer, 375 struct vmw_dma_buffer *buffer,
376 size_t shader_size, 376 size_t shader_size,
377 size_t offset, 377 size_t offset,
378 SVGA3dShaderType shader_type, 378 SVGA3dShaderType shader_type,
379 struct ttm_object_file *tfile, 379 struct ttm_object_file *tfile,
380 u32 *handle) 380 u32 *handle)
381{ 381{
382 struct vmw_user_shader *ushader; 382 struct vmw_user_shader *ushader;
383 struct vmw_resource *res, *tmp; 383 struct vmw_resource *res, *tmp;
@@ -779,6 +779,8 @@ vmw_compat_shader_man_create(struct vmw_private *dev_priv)
779 int ret; 779 int ret;
780 780
781 man = kzalloc(sizeof(*man), GFP_KERNEL); 781 man = kzalloc(sizeof(*man), GFP_KERNEL);
782 if (man == NULL)
783 return ERR_PTR(-ENOMEM);
782 784
783 man->dev_priv = dev_priv; 785 man->dev_priv = dev_priv;
784 INIT_LIST_HEAD(&man->list); 786 INIT_LIST_HEAD(&man->list);