From patchwork Fri Nov 23 10:06:12 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 1794771 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id 23AEFDF254 for ; Fri, 23 Nov 2012 10:51:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 21487E6619 for ; Fri, 23 Nov 2012 02:51:31 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pa0-f49.google.com (mail-pa0-f49.google.com [209.85.220.49]) by gabe.freedesktop.org (Postfix) with ESMTP id 32607E5C35 for ; Fri, 23 Nov 2012 02:12:31 -0800 (PST) Received: by mail-pa0-f49.google.com with SMTP id bi1so3234803pad.36 for ; Fri, 23 Nov 2012 02:12:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:x-gm-message-state; bh=eduaXq2jm/nS/9kV1ZP13f3Punz9LlG8xJpOZ6BFhMk=; b=GcArUHjHb7v9LDlT9WvCRT4PITORElJGLlKDI8yG1DNeO+MqWbCIShIlt0hkmUWg5i ksUazA+MuzRPxzRVXprIk2s+Xh7e8wkSnK9kJufxZjCeh7a9FFhs+Me8W7MuUbVWYNzi EUPgZhMUJhNzawgcT9KiYqJajUDaNxcu0aQ1/B78sB5YpAcCYLPJhx1SovmQm4UBgT2t 80r3lVh3naCz5m/mov5b2H43988wn3TNFrGYi0ouw16AmrxQhS5x4FHycop+iGbT2cN1 CI5FVBebJ3WEW4GuKvlyw8lx+GuQFXP3zi6YT/TdpM1BN0KSDG2sQx6prt+RrT1UoM9G FRWg== Received: by 10.66.84.40 with SMTP id v8mr9144686pay.47.1353665550772; Fri, 23 Nov 2012 02:12:30 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id kc4sm3604933pbc.23.2012.11.23.02.12.28 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 23 Nov 2012 02:12:30 -0800 (PST) From: Sachin Kamat To: dri-devel@lists.freedesktop.org Subject: [PATCH 1/1] drm/exynos: remove unnecessary clk_disable calls in exynos_drm_fimd.c Date: Fri, 23 Nov 2012 15:36:12 +0530 Message-Id: <1353665172-6754-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 X-Gm-Message-State: ALoCoQmkHkemI/8lTVqdOjAO9W/Bgz8gWhv6wrFgTQjAdIyH1Lxm8yfNuz15RDOOqfaOpmn8ZTxX X-Mailman-Approved-At: Fri, 23 Nov 2012 02:43:48 -0800 Cc: sachin.kamat@linaro.org, patches@linaro.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Also fixes an error related to returning 'ret' without initialising with error code. Signed-off-by: Sachin Kamat --- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 22 +++++----------------- 1 files changed, 5 insertions(+), 17 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c index 57851cc..00bd266 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c @@ -849,15 +849,13 @@ static int __devinit fimd_probe(struct platform_device *pdev) ctx->bus_clk = devm_clk_get(dev, "fimd"); if (IS_ERR(ctx->bus_clk)) { dev_err(dev, "failed to get bus clock\n"); - ret = PTR_ERR(ctx->bus_clk); - goto err_clk_get; + return PTR_ERR(ctx->bus_clk); } ctx->lcd_clk = devm_clk_get(dev, "sclk_fimd"); if (IS_ERR(ctx->lcd_clk)) { dev_err(dev, "failed to get lcd clock\n"); - ret = PTR_ERR(ctx->lcd_clk); - goto err_bus_clk; + return PTR_ERR(ctx->lcd_clk); } res = platform_get_resource(pdev, IORESOURCE_MEM, 0); @@ -865,14 +863,13 @@ static int __devinit fimd_probe(struct platform_device *pdev) ctx->regs = devm_request_and_ioremap(&pdev->dev, res); if (!ctx->regs) { dev_err(dev, "failed to map registers\n"); - ret = -ENXIO; - goto err_clk; + return -ENXIO; } res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); if (!res) { dev_err(dev, "irq request failed.\n"); - goto err_clk; + return -ENXIO; } ctx->irq = res->start; @@ -881,7 +878,7 @@ static int __devinit fimd_probe(struct platform_device *pdev) 0, "drm_fimd", ctx); if (ret) { dev_err(dev, "irq request failed.\n"); - goto err_clk; + return ret; } ctx->vidcon0 = pdata->vidcon0; @@ -915,15 +912,6 @@ static int __devinit fimd_probe(struct platform_device *pdev) exynos_drm_subdrv_register(subdrv); return 0; - -err_clk: - clk_disable(ctx->lcd_clk); - -err_bus_clk: - clk_disable(ctx->bus_clk); - -err_clk_get: - return ret; } static int __devexit fimd_remove(struct platform_device *pdev)