From patchwork Fri Nov 23 04:45:00 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 1793641 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 36BE33FCAE for ; Fri, 23 Nov 2012 04:51:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756067Ab2KWEv3 (ORCPT ); Thu, 22 Nov 2012 23:51:29 -0500 Received: from mail-pb0-f46.google.com ([209.85.160.46]:56796 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755727Ab2KWEv2 (ORCPT ); Thu, 22 Nov 2012 23:51:28 -0500 Received: by mail-pb0-f46.google.com with SMTP id wy7so6266460pbc.19 for ; Thu, 22 Nov 2012 20:51:28 -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=ZroDjhxU0kBN38nf6b55rTOzQ8LUIqOWa8IsbTqF+0vb0yHf7JRosytbogSNfLzgAR 783BVcULx1VHqZH6LiCGihgpTiLt7zlLCJfSpaKJuT16TTlqGl33UodmLKDcKrAoNyx5 ynkdUHYdw7TSbDhG5tqgTlHVm8C/R0SU/eMR7zTeBY3rqsuElkFKUmu/HC7fIEb+gGZS z+dm2fbvznHMkkwBi4h99maGK6D/NcIY99bIhNjnmlYUaXma7O7FLMahgDKqZcaFpey6 AdjhPBZi7rQvPkIGVDUCvUzYC5NnfAdh9EjAFZJeHJKqLdqIrjScVNMbRS6L+MiFvlU3 J0Pw== Received: by 10.68.132.202 with SMTP id ow10mr10683661pbb.139.1353646288474; Thu, 22 Nov 2012 20:51:28 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id x8sm3029746paw.16.2012.11.22.20.51.25 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 22 Nov 2012 20:51:27 -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 2/4] [media] exynos-gsc: Remove gsc_clk_put call from gsc_clk_get Date: Fri, 23 Nov 2012 10:15:00 +0530 Message-Id: <1353645902-7467-3-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1353645902-7467-1-git-send-email-sachin.kamat@linaro.org> References: <1353645902-7467-1-git-send-email-sachin.kamat@linaro.org> X-Gm-Message-State: ALoCoQlU7Sy46xe256YCvGjxWLiqyqUnm8AXnjbGYOg5awlU7pBAwHkrfI2GGXAmnhD9/xOleQu+ 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; }