Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2520777imu; Thu, 29 Nov 2018 06:20:49 -0800 (PST) X-Google-Smtp-Source: AFSGD/WsWoja+m39TmXaBwdB3oDdmgyzUEAtNFnYJ7jJG+jjDIXpcpyW/lgUQHsds8eGthuW99Iy X-Received: by 2002:a63:d450:: with SMTP id i16mr1385740pgj.246.1543501249303; Thu, 29 Nov 2018 06:20:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543501249; cv=none; d=google.com; s=arc-20160816; b=dbic3zbX5s13WMKziQC4TvIVH+pB+3AA/cikmrBWPdkjEZeorZawCCcPMlGzDjemcw zOys9G2IywWTgwGsdK2m23mZXHV6XFYRbcgf1VejFq8RkqxMRjP0KsayUbCcsLzB3Wrz iv0ZakV/IJguqcevVSFfFnvi57JNwKC1TsZvfn0mTGDy7KgUag3jWchjfrV1B99LV5/J YzOKHVSmI9iSOEo1pfxM8MwgPssxo+o8nBQhAHuUQgOQdJVp5upFdqvfjCDzSJl1XUaE SXAr2zpT5gDqQnGiIM5QpHUnO0RY9PltxNdb4WTTyzOIanvrf9zszVF0ClHtcDgaqJD7 Ex2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=S3+rTscGrcz2Zhq+ZHdPo7soDeVzqzBSpzjUD4XOrpE=; b=qdqOXQ3F8QzXrJpf8lOVvmBJdhe5pKKkKmw6sbbHuQHCVd0x4C2Sz1pKe15s/BjPet Fw2gps+VwILxJ+bkpV7nHMCgHO++nwqjy9O3AfEBy3OUVtyi5yI8KobRzmwMg0TQpOha LXeL9QZw/nIF64ovWQGeAhsjtxoJ9uuzkorO4erqaViqIcfiAPaJ3q1hLTTRMGlryWMM GjOlBzdLszJVJqY/fHE8+Ob5RwkBB588MsbedD8EXbugqEmMnHM8Rmxft+PwVtChCdff pXjGRSEo0uRmnWuol5Oi7x/uf6JUtafniEAWJoszuyP2LInRx8CmJ6cgvIf7pXe5+Mm4 f42w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MXg6SRnv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j61si2255467plb.232.2018.11.29.06.20.33; Thu, 29 Nov 2018 06:20:49 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MXg6SRnv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730358AbeK3BWw (ORCPT + 99 others); Thu, 29 Nov 2018 20:22:52 -0500 Received: from mail.kernel.org ([198.145.29.99]:44714 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728439AbeK3BWv (ORCPT ); Thu, 29 Nov 2018 20:22:51 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 20EB621104; Thu, 29 Nov 2018 14:17:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1543501041; bh=P4Go9MPIX5M7fUh79czwAKx5ibK0lCJ5WO95fNILib4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MXg6SRnvYfRXO8DLq4b/QDp8dj58N9jiIBJD41iNEYRy4VI//EAK0/YQ7Cu47sH+c tSMbmgBy0cvmqO3kebtYulwnrije6TBr5z6s7nycuu9ESJSPD4vYvfQMJltVQgXjVZ QRra1eNFy3/nCU02nn/aWBFlHWi5IpIAunduGxc4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Anson Huang , Viresh Kumar , "Rafael J. Wysocki" , Sasha Levin Subject: [PATCH 4.4 19/86] cpufreq: imx6q: add return value check for voltage scale Date: Thu, 29 Nov 2018 15:11:44 +0100 Message-Id: <20181129140111.426318417@linuxfoundation.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181129140109.832117862@linuxfoundation.org> References: <20181129140109.832117862@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 6ef28a04d1ccf718eee069b72132ce4aa1e52ab9 ] Add return value check for voltage scale when ARM clock rate change fail. Signed-off-by: Anson Huang Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin --- drivers/cpufreq/imx6q-cpufreq.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/cpufreq/imx6q-cpufreq.c b/drivers/cpufreq/imx6q-cpufreq.c index ef1fa8145419..fa86946d12aa 100644 --- a/drivers/cpufreq/imx6q-cpufreq.c +++ b/drivers/cpufreq/imx6q-cpufreq.c @@ -130,8 +130,13 @@ static int imx6q_set_target(struct cpufreq_policy *policy, unsigned int index) /* Ensure the arm clock divider is what we expect */ ret = clk_set_rate(arm_clk, new_freq * 1000); if (ret) { + int ret1; + dev_err(cpu_dev, "failed to set clock rate: %d\n", ret); - regulator_set_voltage_tol(arm_reg, volt_old, 0); + ret1 = regulator_set_voltage_tol(arm_reg, volt_old, 0); + if (ret1) + dev_warn(cpu_dev, + "failed to restore vddarm voltage: %d\n", ret1); return ret; } -- 2.17.1