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: 1794801 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 8AB79DF254 for ; Fri, 23 Nov 2012 11:11:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755885Ab2KWLLL (ORCPT ); Fri, 23 Nov 2012 06:11:11 -0500 Received: from mail-da0-f46.google.com ([209.85.210.46]:55430 "EHLO mail-da0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755806Ab2KWLLI (ORCPT ); Fri, 23 Nov 2012 06:11:08 -0500 Received: by mail-da0-f46.google.com with SMTP id p5so2599382dak.19 for ; Fri, 23 Nov 2012 03:11:08 -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:in-reply-to:references :x-gm-message-state; bh=dMtvP0JJQ3VW6Wd7L/Pt4doK6PCHJ6vpXKyjbS8G1fk=; b=O2RhJpgjpZO7dBrpeQXPZnVVkTMBvasjEz4RxEYEa+8Dj+fO3NcpZLTWdJ0wj9CbMI yXCV0GRyFZbPvyRfOWseVuQ2HIcMj19cMGG6ayQTD9gO0Q6dgjqmcgRSIHgU9CVGAAIp zNjjgjaT5WoejCYhuuN0eeYAMHaxQ/TzAB3MOowPJultrL57SBnC5PzKL5ziGkQZ6Xaj NB6EtKI9iHox4iY4ummqJQntinqZUYzmzK/74z7jc2rm4wUJRE22m+m4vNt/MTkOfJMi BHAgFIEx56riz/xGyA8JCAtfrFHuEf/LH3aBdGxNYjPwZnu2llxc8wEUpRWsuQOS8y1T bZFg== 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: ALoCoQnL10tHr4eEZ3dl28uDSztnAV1NHj6sRlF0SoP3K4Og6htePbp+RvD1ExQi9TiaJ23iHgQ1 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org 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; }