From patchwork Wed Oct 9 15:13:37 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manish Badarkhe X-Patchwork-Id: 3009351 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id CCCBA9F243 for ; Wed, 9 Oct 2013 15:13:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A8CD120251 for ; Wed, 9 Oct 2013 15:13:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7EDC420240 for ; Wed, 9 Oct 2013 15:13:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755101Ab3JIPNt (ORCPT ); Wed, 9 Oct 2013 11:13:49 -0400 Received: from mail-pb0-f48.google.com ([209.85.160.48]:64846 "EHLO mail-pb0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751959Ab3JIPNs (ORCPT ); Wed, 9 Oct 2013 11:13:48 -0400 Received: by mail-pb0-f48.google.com with SMTP id ma3so1047566pbc.21 for ; Wed, 09 Oct 2013 08:13:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=y/Ft4xg7BWvtqyR4SbjEYilZpiqxnEA9YQrH6K7ikgI=; b=cLE4eHI9pjVs2GSM8Q6Zq2J1aWIHwT2wU5XGtS6sryr3xCDLhtCJ8rcxBIn98P3VNx dS/nN7xEvFFklEgsIVAOjI6lPOJtVrB7d5Dm+UDZWQRR3DVdsGkBnCbd3Ss29pVo2BW7 2EZdEJ7BmJcaeFACDDyF9L99juEtyHRCBmi7a7mf5N2ATegmPAIDT9KBl1ONh/JsrIb8 ok6VCi4ZWRbaih/+l+pqHj7Gn3N09MeystCjOB4v9ktdi4rPWvq/PexygQmrfnGx149B LlvTPouwRsEXY/0Bebb/w6A5APHxMHL14Vc1fauwo+Gs05kxm9dPB8JruXoqMSD6dJIS +7Uw== X-Received: by 10.66.119.78 with SMTP id ks14mr10068992pab.140.1381331626246; Wed, 09 Oct 2013 08:13:46 -0700 (PDT) Received: from localhost.localdomain ([113.193.145.88]) by mx.google.com with ESMTPSA id om2sm47198752pbc.30.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 09 Oct 2013 08:13:44 -0700 (PDT) From: Manish Badarkhe To: cpufreq@vger.kernel.org, linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: rjw@sisk.pl, badarkhe.manish@gmail.com, viresh.kumar@linaro.org, kgene.kim@samsung.com Subject: [PATCH] cpufreq: fix false return check from "regulator_set_voltage" Date: Wed, 9 Oct 2013 20:43:37 +0530 Message-Id: <1381331617-14703-1-git-send-email-badarkhe.manish@gmail.com> X-Mailer: git-send-email 1.7.10.4 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Currently, code checks false return value from "regulator_set_voltage" to show failure message. Modify the code to check proper return value from "regulator_set_voltage". Signed-off-by: Manish Badarkhe Acked-by: Viresh Kumar --- Based on master branch of linux-mainline. :100644 100644 0fac344... 1537f32... M drivers/cpufreq/exynos-cpufreq.c drivers/cpufreq/exynos-cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cpufreq/exynos-cpufreq.c b/drivers/cpufreq/exynos-cpufreq.c index 0fac344..1537f32 100644 --- a/drivers/cpufreq/exynos-cpufreq.c +++ b/drivers/cpufreq/exynos-cpufreq.c @@ -141,7 +141,7 @@ post_notify: if ((freqs.new < freqs.old) || ((freqs.new > freqs.old) && safe_arm_volt)) { /* down the voltage after frequency change */ - regulator_set_voltage(arm_regulator, arm_volt, + ret = regulator_set_voltage(arm_regulator, arm_volt, arm_volt); if (ret) { pr_err("%s: failed to set cpu voltage to %d\n",