All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/gma500: Fix error return code in psb_driver_load()
@ 2020-11-30  2:02 ` Jialin Zhang
  0 siblings, 0 replies; 4+ messages in thread
From: Jialin Zhang @ 2020-11-30  2:02 UTC (permalink / raw)
  To: Patrik Jakobsson, David Airlie, Daniel Vetter, Alan Cox, Dave Airlie
  Cc: dri-devel, linux-kernel, huawei.libin

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Fixes: 5c49fd3aa0ab ("gma500: Add the core DRM files and headers")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jialin Zhang <zhangjialin11@huawei.com>
---
 drivers/gpu/drm/gma500/psb_drv.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/gma500/psb_drv.c b/drivers/gpu/drm/gma500/psb_drv.c
index 34b4aae9a15e..074f403d7ca0 100644
--- a/drivers/gpu/drm/gma500/psb_drv.c
+++ b/drivers/gpu/drm/gma500/psb_drv.c
@@ -313,6 +313,8 @@ static int psb_driver_load(struct drm_device *dev, unsigned long flags)
 	if (ret)
 		goto out_err;
 
+	ret = -ENOMEM;
+
 	dev_priv->mmu = psb_mmu_driver_init(dev, 1, 0, 0);
 	if (!dev_priv->mmu)
 		goto out_err;
-- 
2.25.1


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

* [PATCH] drm/gma500: Fix error return code in psb_driver_load()
@ 2020-11-30  2:02 ` Jialin Zhang
  0 siblings, 0 replies; 4+ messages in thread
From: Jialin Zhang @ 2020-11-30  2:02 UTC (permalink / raw)
  To: Patrik Jakobsson, David Airlie, Daniel Vetter, Alan Cox, Dave Airlie
  Cc: huawei.libin, linux-kernel, dri-devel

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Fixes: 5c49fd3aa0ab ("gma500: Add the core DRM files and headers")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jialin Zhang <zhangjialin11@huawei.com>
---
 drivers/gpu/drm/gma500/psb_drv.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/gma500/psb_drv.c b/drivers/gpu/drm/gma500/psb_drv.c
index 34b4aae9a15e..074f403d7ca0 100644
--- a/drivers/gpu/drm/gma500/psb_drv.c
+++ b/drivers/gpu/drm/gma500/psb_drv.c
@@ -313,6 +313,8 @@ static int psb_driver_load(struct drm_device *dev, unsigned long flags)
 	if (ret)
 		goto out_err;
 
+	ret = -ENOMEM;
+
 	dev_priv->mmu = psb_mmu_driver_init(dev, 1, 0, 0);
 	if (!dev_priv->mmu)
 		goto out_err;
-- 
2.25.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH] drm/gma500: Fix error return code in psb_driver_load()
  2020-11-30  2:02 ` Jialin Zhang
@ 2020-11-30 14:32   ` Daniel Vetter
  -1 siblings, 0 replies; 4+ messages in thread
From: Daniel Vetter @ 2020-11-30 14:32 UTC (permalink / raw)
  To: Jialin Zhang
  Cc: Patrik Jakobsson, David Airlie, Daniel Vetter, Alan Cox,
	Dave Airlie, dri-devel, linux-kernel, huawei.libin

On Mon, Nov 30, 2020 at 10:02:16AM +0800, Jialin Zhang wrote:
> Fix to return a negative error code from the error handling
> case instead of 0, as done elsewhere in this function.
> 
> Fixes: 5c49fd3aa0ab ("gma500: Add the core DRM files and headers")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Jialin Zhang <zhangjialin11@huawei.com>

Out of curiosity, what is hulk robot matching here? This is a really
interesting bug for automated checkers to find!

Thanks for the patch, applied to drm-misc-next.
-Daniel

> ---
>  drivers/gpu/drm/gma500/psb_drv.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/gma500/psb_drv.c b/drivers/gpu/drm/gma500/psb_drv.c
> index 34b4aae9a15e..074f403d7ca0 100644
> --- a/drivers/gpu/drm/gma500/psb_drv.c
> +++ b/drivers/gpu/drm/gma500/psb_drv.c
> @@ -313,6 +313,8 @@ static int psb_driver_load(struct drm_device *dev, unsigned long flags)
>  	if (ret)
>  		goto out_err;
>  
> +	ret = -ENOMEM;
> +
>  	dev_priv->mmu = psb_mmu_driver_init(dev, 1, 0, 0);
>  	if (!dev_priv->mmu)
>  		goto out_err;
> -- 
> 2.25.1
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

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

* Re: [PATCH] drm/gma500: Fix error return code in psb_driver_load()
@ 2020-11-30 14:32   ` Daniel Vetter
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Vetter @ 2020-11-30 14:32 UTC (permalink / raw)
  To: Jialin Zhang
  Cc: huawei.libin, David Airlie, linux-kernel, dri-devel, Dave Airlie,
	Alan Cox

On Mon, Nov 30, 2020 at 10:02:16AM +0800, Jialin Zhang wrote:
> Fix to return a negative error code from the error handling
> case instead of 0, as done elsewhere in this function.
> 
> Fixes: 5c49fd3aa0ab ("gma500: Add the core DRM files and headers")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Jialin Zhang <zhangjialin11@huawei.com>

Out of curiosity, what is hulk robot matching here? This is a really
interesting bug for automated checkers to find!

Thanks for the patch, applied to drm-misc-next.
-Daniel

> ---
>  drivers/gpu/drm/gma500/psb_drv.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/gma500/psb_drv.c b/drivers/gpu/drm/gma500/psb_drv.c
> index 34b4aae9a15e..074f403d7ca0 100644
> --- a/drivers/gpu/drm/gma500/psb_drv.c
> +++ b/drivers/gpu/drm/gma500/psb_drv.c
> @@ -313,6 +313,8 @@ static int psb_driver_load(struct drm_device *dev, unsigned long flags)
>  	if (ret)
>  		goto out_err;
>  
> +	ret = -ENOMEM;
> +
>  	dev_priv->mmu = psb_mmu_driver_init(dev, 1, 0, 0);
>  	if (!dev_priv->mmu)
>  		goto out_err;
> -- 
> 2.25.1
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2020-11-30 14:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-30  2:02 [PATCH] drm/gma500: Fix error return code in psb_driver_load() Jialin Zhang
2020-11-30  2:02 ` Jialin Zhang
2020-11-30 14:32 ` Daniel Vetter
2020-11-30 14:32   ` Daniel Vetter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.