diff mbox

[2/5] drm/exynos: Remove redundant check in exynos_drm_fimd.c file

Message ID 1344235580-3030-3-git-send-email-sachin.kamat@linaro.org
State Accepted
Headers show

Commit Message

Sachin Kamat Aug. 6, 2012, 6:46 a.m. UTC
devm_request_and_ioremap function checks the validity of the
pointer returned by platform_get_resource. Hence an additional check
in the probe function is not necessary.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/gpu/drm/exynos/exynos_drm_fimd.c |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)

Comments

대인기/Tizen Platform Lab(SR)/삼성전자 Aug. 8, 2012, 1:07 a.m. UTC | #1
> -----Original Message-----
> From: Sachin Kamat [mailto:sachin.kamat@linaro.org]
> Sent: Monday, August 06, 2012 3:46 PM
> To: dri-devel@lists.freedesktop.org
> Cc: inki.dae@samsung.com; airlied@linux.ie; sachin.kamat@linaro.org;
> patches@linaro.org
> Subject: [PATCH 2/5] drm/exynos: Remove redundant check in
> exynos_drm_fimd.c file
> 
> devm_request_and_ioremap function checks the validity of the
> pointer returned by platform_get_resource. Hence an additional check
> in the probe function is not necessary.
> 
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> ---
>  drivers/gpu/drm/exynos/exynos_drm_fimd.c |    5 -----
>  1 files changed, 0 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
> b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
> index a68d2b3..b19cd93 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
> @@ -831,11 +831,6 @@ static int __devinit fimd_probe(struct
> platform_device *pdev)
>  	}
> 
>  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	if (!res) {
> -		dev_err(dev, "failed to find registers\n");
> -		ret = -ENOENT;
> -		goto err_clk;
> -	}
> 
>  	ctx->regs = devm_request_and_ioremap(&pdev->dev, res);
>  	if (!ctx->regs) {
> --
> 1.7.4.1

Applied.

Thanks for your patch.
diff mbox

Patch

diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
index a68d2b3..b19cd93 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
@@ -831,11 +831,6 @@  static int __devinit fimd_probe(struct platform_device *pdev)
 	}
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		dev_err(dev, "failed to find registers\n");
-		ret = -ENOENT;
-		goto err_clk;
-	}
 
 	ctx->regs = devm_request_and_ioremap(&pdev->dev, res);
 	if (!ctx->regs) {