aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2016-11-29 01:49:19 -0500
committerSinclair Yeh <syeh@vmware.com>2017-07-18 02:40:55 -0400
commitd7f482313322892b28f3c14958177cd15c6a113d (patch)
treefdd1a16f10442a207f1ce55db59647602de8e0c1
parent1a4adb05632e902c9819af7c5eeded5243f1dc6c (diff)
drm/vmwgfx: Fix handling of errors returned by 'vmw_cotable_alloc()'
'vmw_cotable_alloc()' returns an error pointer on error, not NULL. Propagate the error code, instead of returning -ENOMEM unconditionally Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Sinclair Yeh <syeh@vmware.com> Signed-off-by: Sinclair Yeh <syeh@vmware.com>
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_context.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_context.c b/drivers/gpu/drm/vmwgfx/vmwgfx_context.c
index 1a46b18bf2b7..be0877651098 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_context.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_context.c
@@ -209,8 +209,8 @@ static int vmw_gb_context_init(struct vmw_private *dev_priv,
209 for (i = 0; i < SVGA_COTABLE_DX10_MAX; ++i) { 209 for (i = 0; i < SVGA_COTABLE_DX10_MAX; ++i) {
210 uctx->cotables[i] = vmw_cotable_alloc(dev_priv, 210 uctx->cotables[i] = vmw_cotable_alloc(dev_priv,
211 &uctx->res, i); 211 &uctx->res, i);
212 if (unlikely(uctx->cotables[i] == NULL)) { 212 if (unlikely(IS_ERR(uctx->cotables[i]))) {
213 ret = -ENOMEM; 213 ret = PTR_ERR(uctx->cotables[i]);
214 goto out_cotables; 214 goto out_cotables;
215 } 215 }
216 } 216 }