]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
drm/vmwgfx: fix error return code in vmw_driver_load()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Mon, 26 Aug 2013 07:15:37 +0000 (15:15 +0800)
committerDave Airlie <airlied@gmail.com>
Thu, 29 Aug 2013 22:57:51 +0000 (08:57 +1000)
Fix to return -ENOMEM in the fence manager init error handling
case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Dmitry Torokhov <dtor@vmware.com>
Signed-off-by: Dave Airlie <airlied@gmail.com>
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c

index 0dcfa6b76c45aa42f36526d67cd38f31958b3215..1a90f0a2f7e5aa7b994558b18a3cffd2d1254ee8 100644 (file)
@@ -622,8 +622,10 @@ static int vmw_driver_load(struct drm_device *dev, unsigned long chipset)
        }
 
        dev_priv->fman = vmw_fence_manager_init(dev_priv);
-       if (unlikely(dev_priv->fman == NULL))
+       if (unlikely(dev_priv->fman == NULL)) {
+               ret = -ENOMEM;
                goto out_no_fman;
+       }
 
        vmw_kms_save_vga(dev_priv);