mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drm/vmwgfx: fix error return code in vmw_driver_load()
@ 2013-08-26  7:15 Wei Yongjun
  2013-08-26  7:56 ` Dmitry Torokhov
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2013-08-26  7:15 UTC (permalink / raw)
  To: airlied, airlied, thellstrom, brianp, dtor, daniel.vetter
  Cc: yongjun_wei, dri-devel, linux-kernel

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

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>
---
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
index 78e2164..6dafefc 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
@@ -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);
 


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm/vmwgfx: fix error return code in vmw_driver_load()
  2013-08-26  7:15 [PATCH] drm/vmwgfx: fix error return code in vmw_driver_load() Wei Yongjun
@ 2013-08-26  7:56 ` Dmitry Torokhov
  0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2013-08-26  7:56 UTC (permalink / raw)
  To: Wei Yongjun
  Cc: airlied, airlied, thellstrom, brianp, daniel.vetter, yongjun_wei,
	dri-devel, linux-kernel

On Monday, August 26, 2013 03:15:37 PM Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> 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>

> ---
>  drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
> b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c index 78e2164..6dafefc 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
> @@ -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);

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-08-26  8:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-26  7:15 [PATCH] drm/vmwgfx: fix error return code in vmw_driver_load() Wei Yongjun
2013-08-26  7:56 ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®