From patchwork Fri Nov 23 11:04:40 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 13139 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 043FE23FC6 for ; Fri, 23 Nov 2012 11:11:10 +0000 (UTC) Received: from mail-ia0-f180.google.com (mail-ia0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id A314FA194A9 for ; Fri, 23 Nov 2012 11:11:09 +0000 (UTC) Received: by mail-ia0-f180.google.com with SMTP id t4so3690971iag.11 for ; Fri, 23 Nov 2012 03:11:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=dMtvP0JJQ3VW6Wd7L/Pt4doK6PCHJ6vpXKyjbS8G1fk=; b=ckwLTozHbHii+EaC51m5jNzuxBYio5c8l1Eq8n06q8ASXM+1DvuoGAzVz6zfgwLXGG gsiGyFlryZymFLirFJx0NqcQU0Z7Hx7t7yGSErCzwBZ1fiqjItxU3kjmAWMpj0Eq92RH 674EgeSs1fyZwA4l5PZPl9sEOoH8DH/m8NbAYz5Ei0n0f5cGoZkEZ609eR2XnaZo282M mpHm/RciPTvaaqR5m1D9U1C0IZ2hGZEf4vzKzgURsFEv7R761693S2iZpY1ujpeuiJgu 57PxOYz0SEhKCwtvF8nngVmMuwr7N3eI6zydSBn0AGWHULKTE/LdHLCWDYhvi6uE47mq Ojfw== Received: by 10.50.187.197 with SMTP id fu5mr3103885igc.70.1353669069033; Fri, 23 Nov 2012 03:11:09 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.67.148 with SMTP id n20csp336304igt; Fri, 23 Nov 2012 03:11:08 -0800 (PST) Received: by 10.69.1.73 with SMTP id be9mr13456749pbd.116.1353669068518; Fri, 23 Nov 2012 03:11:08 -0800 (PST) Received: from mail-pa0-f41.google.com (mail-pa0-f41.google.com [209.85.220.41]) by mx.google.com with ESMTPS id zz3si8230784pbc.61.2012.11.23.03.11.08 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 23 Nov 2012 03:11:08 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.41 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.220.41; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.41 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) smtp.mail=sachin.kamat@linaro.org Received: by mail-pa0-f41.google.com with SMTP id bj3so2551801pad.14 for ; Fri, 23 Nov 2012 03:11:08 -0800 (PST) Received: by 10.68.241.136 with SMTP id wi8mr13378998pbc.95.1353669068284; Fri, 23 Nov 2012 03:11:08 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id wf8sm3667394pbc.65.2012.11.23.03.11.05 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 23 Nov 2012 03:11:07 -0800 (PST) From: Sachin Kamat To: linux-media@vger.kernel.org Cc: s.nawrocki@samsung.com, sachin.kamat@linaro.org, patches@linaro.org, Shaik Ameer Basha Subject: [PATCH v2 2/4] [media] exynos-gsc: Remove gsc_clk_put call from gsc_clk_get Date: Fri, 23 Nov 2012 16:34:40 +0530 Message-Id: <1353668682-13366-3-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1353668682-13366-1-git-send-email-sachin.kamat@linaro.org> References: <1353668682-13366-1-git-send-email-sachin.kamat@linaro.org> X-Gm-Message-State: ALoCoQnWeuGmYVIbWU72UWLrGH/rtasqiTEe4PPztaitnn3wF+mELunJ/lv1C1T+VFHkwVBrHE7Z Since this function just returns (since gsc->clock is NULL), remove it and make the exit code simpler. Cc: Shaik Ameer Basha Signed-off-by: Sachin Kamat --- drivers/media/platform/exynos-gsc/gsc-core.c | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/media/platform/exynos-gsc/gsc-core.c b/drivers/media/platform/exynos-gsc/gsc-core.c index 45bcfa7..99ee1a9 100644 --- a/drivers/media/platform/exynos-gsc/gsc-core.c +++ b/drivers/media/platform/exynos-gsc/gsc-core.c @@ -1020,7 +1020,7 @@ static int gsc_clk_get(struct gsc_dev *gsc) if (IS_ERR(gsc->clock)) { dev_err(&gsc->pdev->dev, "failed to get clock~~~: %s\n", GSC_CLOCK_GATE_NAME); - goto err_clk_get; + goto err; } ret = clk_prepare(gsc->clock); @@ -1029,14 +1029,12 @@ static int gsc_clk_get(struct gsc_dev *gsc) GSC_CLOCK_GATE_NAME); clk_put(gsc->clock); gsc->clock = NULL; - goto err_clk_prepare; + goto err; } return 0; -err_clk_prepare: - gsc_clk_put(gsc); -err_clk_get: +err: return -ENXIO; }