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: 13113 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 CD1D223E13 for ; Fri, 23 Nov 2012 04:51:29 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id 82BCEA187B3 for ; Fri, 23 Nov 2012 04:51:29 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id c10so1372021ieb.11 for ; Thu, 22 Nov 2012 20:51:29 -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=eE2alDarZGoJiPWnO+EJH0tIj8Do2yOvNMW97DBVIettt1MIFLWzZfULD8GBMJyXoh /ugikbb1kF4pRUdUxvP5fCzRr4769P4qoHQX7Z7BRz5cviBqyz0EIjduGUnkkp14uTLn A2aCxxljAfhGviSzA40qx667x5u7avEQGRwQp7lYeF72rVPu07R+fmT3A8PRlbo96kB8 aitCH/Rkz6ZTP1bo9fDOePLEcD1g0YxfO+NDsNcACEudq+8YWBXpzVN9oDelUL9ZdWId /4+FFbATgsYGI5CVavwCvYVpgvhT382Kuwb3QUY36aqOh1J5NC/L9SVn0Wm4+Yrsj+P/ pzEA== Received: by 10.43.125.133 with SMTP id gs5mr2167880icc.54.1353646289265; Thu, 22 Nov 2012 20:51:29 -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 n20csp301269igt; Thu, 22 Nov 2012 20:51:28 -0800 (PST) Received: by 10.68.200.38 with SMTP id jp6mr10839007pbc.131.1353646288710; Thu, 22 Nov 2012 20:51:28 -0800 (PST) Received: from mail-pb0-f43.google.com (mail-pb0-f43.google.com [209.85.160.43]) by mx.google.com with ESMTPS id yl9si7473215pbc.2.2012.11.22.20.51.28 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 22 Nov 2012 20:51:28 -0800 (PST) Received-SPF: neutral (google.com: 209.85.160.43 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.160.43; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.160.43 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-pb0-f43.google.com with SMTP id wz17so7737867pbc.16 for ; Thu, 22 Nov 2012 20:51:28 -0800 (PST) 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: ALoCoQk+mVepgNY/IUL6DkuTsZgt0vDae7EfkzOXIBOxwxO41M6W6fsLRV0k0iOkLbBaWcmXJ4lS 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; }