diff mbox series

Revert "drm/msm: Depopulate platform on probe failure"

Message ID 20190829122826.15201-2-paolo.pisati@canonical.com
State New
Headers show
Series Revert "drm/msm: Depopulate platform on probe failure" | expand

Commit Message

Paolo Pisati Aug. 29, 2019, 12:28 p.m. UTC
BugLink: https://bugs.launchpad.net/bugs/1841911

This reverts commit 49a03629d321c852553ecbc3f0e71b22d7233b11.

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
---
 drivers/gpu/drm/msm/msm_drv.c | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

Comments

Kleber Sacilotto de Souza Sept. 2, 2019, 1:42 p.m. UTC | #1
On 8/29/19 2:28 PM, Paolo Pisati wrote:
> BugLink: https://bugs.launchpad.net/bugs/1841911
> 
> This reverts commit 49a03629d321c852553ecbc3f0e71b22d7233b11.
> 
> Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>

Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>

> ---
>  drivers/gpu/drm/msm/msm_drv.c | 14 +++-----------
>  1 file changed, 3 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
> index 8eb6bfa..0a3ea30 100644
> --- a/drivers/gpu/drm/msm/msm_drv.c
> +++ b/drivers/gpu/drm/msm/msm_drv.c
> @@ -1138,24 +1138,16 @@ static int msm_pdev_probe(struct platform_device *pdev)
>  
>  	ret = add_gpu_components(&pdev->dev, &match);
>  	if (ret)
> -		goto fail;
> +		return ret;
>  
>  	/* on all devices that I am aware of, iommu's which can map
>  	 * any address the cpu can see are used:
>  	 */
>  	ret = dma_set_mask_and_coherent(&pdev->dev, ~0);
>  	if (ret)
> -		goto fail;
> -
> -	ret = component_master_add_with_match(&pdev->dev, &msm_drm_ops, match);
> -	if (ret)
> -		goto fail;
> -
> -	return 0;
> +		return ret;
>  
> -fail:
> -	of_platform_depopulate(&pdev->dev);
> -	return ret;
> +	return component_master_add_with_match(&pdev->dev, &msm_drm_ops, match);
>  }
>  
>  static int msm_pdev_remove(struct platform_device *pdev)
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
index 8eb6bfa..0a3ea30 100644
--- a/drivers/gpu/drm/msm/msm_drv.c
+++ b/drivers/gpu/drm/msm/msm_drv.c
@@ -1138,24 +1138,16 @@  static int msm_pdev_probe(struct platform_device *pdev)
 
 	ret = add_gpu_components(&pdev->dev, &match);
 	if (ret)
-		goto fail;
+		return ret;
 
 	/* on all devices that I am aware of, iommu's which can map
 	 * any address the cpu can see are used:
 	 */
 	ret = dma_set_mask_and_coherent(&pdev->dev, ~0);
 	if (ret)
-		goto fail;
-
-	ret = component_master_add_with_match(&pdev->dev, &msm_drm_ops, match);
-	if (ret)
-		goto fail;
-
-	return 0;
+		return ret;
 
-fail:
-	of_platform_depopulate(&pdev->dev);
-	return ret;
+	return component_master_add_with_match(&pdev->dev, &msm_drm_ops, match);
 }
 
 static int msm_pdev_remove(struct platform_device *pdev)