linux-samsung-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/exynos: Properly propagate return value in drm_iommu_attach_device()
       [not found] <CGME20200522060409eucas1p1cf023d2be5b8c30da32354262a829de0@eucas1p1.samsung.com>
@ 2020-05-22  6:03 ` Marek Szyprowski
  2020-06-01  8:10   ` Inki Dae
  0 siblings, 1 reply; 2+ messages in thread
From: Marek Szyprowski @ 2020-05-22  6:03 UTC (permalink / raw)
  To: dri-devel, linux-samsung-soc
  Cc: Marek Szyprowski, Bartlomiej Zolnierkiewicz, Seung-Woo Kim,
	Inki Dae, Andrzej Hajda

Propagate the proper error codes from the called functions instead of
unconditionally returning 0.

Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
 drivers/gpu/drm/exynos/exynos_drm_dma.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_dma.c b/drivers/gpu/drm/exynos/exynos_drm_dma.c
index d3fe6c1e6688..5887f7f52f96 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_dma.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_dma.c
@@ -44,7 +44,7 @@ static int drm_iommu_attach_device(struct drm_device *drm_dev,
 				struct device *subdrv_dev, void **dma_priv)
 {
 	struct exynos_drm_private *priv = drm_dev->dev_private;
-	int ret;
+	int ret = 0;
 
 	if (get_dma_ops(priv->dma_dev) != get_dma_ops(subdrv_dev)) {
 		DRM_DEV_ERROR(subdrv_dev, "Device %s lacks support for IOMMU\n",
@@ -69,7 +69,7 @@ static int drm_iommu_attach_device(struct drm_device *drm_dev,
 		ret = iommu_attach_device(priv->mapping, subdrv_dev);
 	}
 
-	return 0;
+	return ret;
 }
 
 /*
-- 
2.17.1


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

* Re: [PATCH] drm/exynos: Properly propagate return value in drm_iommu_attach_device()
  2020-05-22  6:03 ` [PATCH] drm/exynos: Properly propagate return value in drm_iommu_attach_device() Marek Szyprowski
@ 2020-06-01  8:10   ` Inki Dae
  0 siblings, 0 replies; 2+ messages in thread
From: Inki Dae @ 2020-06-01  8:10 UTC (permalink / raw)
  To: Marek Szyprowski, dri-devel, linux-samsung-soc
  Cc: Bartlomiej Zolnierkiewicz, Seung-Woo Kim, Andrzej Hajda



20. 5. 22. 오후 3:03에 Marek Szyprowski 이(가) 쓴 글:
> Propagate the proper error codes from the called functions instead of
> unconditionally returning 0.
> 

Picked it up.

Thanks,
Inki Dae

> Reported-by: kbuild test robot <lkp@intel.com>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
>  drivers/gpu/drm/exynos/exynos_drm_dma.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_dma.c b/drivers/gpu/drm/exynos/exynos_drm_dma.c
> index d3fe6c1e6688..5887f7f52f96 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_dma.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_dma.c
> @@ -44,7 +44,7 @@ static int drm_iommu_attach_device(struct drm_device *drm_dev,
>  				struct device *subdrv_dev, void **dma_priv)
>  {
>  	struct exynos_drm_private *priv = drm_dev->dev_private;
> -	int ret;
> +	int ret = 0;
>  
>  	if (get_dma_ops(priv->dma_dev) != get_dma_ops(subdrv_dev)) {
>  		DRM_DEV_ERROR(subdrv_dev, "Device %s lacks support for IOMMU\n",
> @@ -69,7 +69,7 @@ static int drm_iommu_attach_device(struct drm_device *drm_dev,
>  		ret = iommu_attach_device(priv->mapping, subdrv_dev);
>  	}
>  
> -	return 0;
> +	return ret;
>  }
>  
>  /*
> 

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

end of thread, other threads:[~2020-06-01  8:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20200522060409eucas1p1cf023d2be5b8c30da32354262a829de0@eucas1p1.samsung.com>
2020-05-22  6:03 ` [PATCH] drm/exynos: Properly propagate return value in drm_iommu_attach_device() Marek Szyprowski
2020-06-01  8:10   ` Inki Dae

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).