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>
This commit is contained in:
parent
1a4adb0563
commit
d7f4823133
@ -209,8 +209,8 @@ static int vmw_gb_context_init(struct vmw_private *dev_priv,
|
|||||||
for (i = 0; i < SVGA_COTABLE_DX10_MAX; ++i) {
|
for (i = 0; i < SVGA_COTABLE_DX10_MAX; ++i) {
|
||||||
uctx->cotables[i] = vmw_cotable_alloc(dev_priv,
|
uctx->cotables[i] = vmw_cotable_alloc(dev_priv,
|
||||||
&uctx->res, i);
|
&uctx->res, i);
|
||||||
if (unlikely(uctx->cotables[i] == NULL)) {
|
if (unlikely(IS_ERR(uctx->cotables[i]))) {
|
||||||
ret = -ENOMEM;
|
ret = PTR_ERR(uctx->cotables[i]);
|
||||||
goto out_cotables;
|
goto out_cotables;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user