Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2552977imu; Thu, 29 Nov 2018 06:48:15 -0800 (PST) X-Google-Smtp-Source: AFSGD/VUhHqYSmje2e5F2OfSynPZk6njNk3tbrUJldqyWAcmj9y0vb0YtYevml27VFbuo16LpCOR X-Received: by 2002:aa7:80d7:: with SMTP id a23mr1641560pfn.86.1543502895706; Thu, 29 Nov 2018 06:48:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543502895; cv=none; d=google.com; s=arc-20160816; b=K8d2ZQn4Eqnpqghg7ClOASRkoB0SfzEKxwYr/Q2ngGtX31nmbXnkK6TtTF6SNgf08/ pn49jlHNKoVohxKunQqbnVc8WgWTAyywVpVBKILkzip3c0ZBTI/jb7gP9wwMouRTpCCD 3I7dT7O7+soRLyvqeEPKOjT2VWAEOFW/FtFWQp5GY4WdXsa/hhUuiBW6R+8CeaTerjCy V1bkFaB+m7u1fR0KPGOveuVhhpDiKAQ7fkq1rjufERFDegRknZwgthrcI++MLEaoZSgz 4CQ2yjeDl9rN95LmblB54ydy/6F/OtJHMgoFbJhohSTz3Y7ra5+52m8hJi6JMUlfQdV3 9DRg== 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=Ps7ISjRLVVJKvMPTKj1D+1+KY6SnJkV5laL6qNgtiRY=; b=Amjs50BOz1xyOFSul8T5auEbGzcS+Lot6k7qUFkJC24spteqWsl41KjxhDPLk0EaQl 02vrOjKRKtJ1moBA6pz4gptjcBY9Gr+dj4P3RhnVYdwL5qkIITD6S25BOvxIxSShxdCk AbvubpF42Y0NVHWBUaAY+Key6qLRvvg0I0cj9g00QF9TfM5jyf0INkxeE1UcBKzlvBNe 6550q3ryKsJDHoDoraQip9+OVDrvBhkphhmHEBo0JjyNjifB6Yh0yXy6hEgwxYhbyKb9 vvlYIRfQ9tdXO57DNznduZ4N6iAm15jJE71NNdbGnxsSf56Nz22eMl3HOC8x33Hj0Hb/ li5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0YZp+fkj; 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 t20si2165906ply.359.2018.11.29.06.47.59; Thu, 29 Nov 2018 06:48:15 -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=0YZp+fkj; 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 S1733257AbeK3Bbw (ORCPT + 99 others); Thu, 29 Nov 2018 20:31:52 -0500 Received: from mail.kernel.org ([198.145.29.99]:59620 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733249AbeK3Bbv (ORCPT ); Thu, 29 Nov 2018 20:31: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 4E8A0213A2; Thu, 29 Nov 2018 14:26:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1543501579; bh=a0f71E5axXwuzxXftP3vMf8TH23+CwwgxCswIYsECUE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0YZp+fkjFu3B0U+UzMmkqIZV0AEj6toZgsAabrHeDIfIwej/4ZWc6eM0b7fnkUpRK VWN0kL8JflPwLnKbIc1vcwW0Wl4LlpmoK7KSIdR14gU4Wy8UUr2CEmVPKqV37+6Fkw uTUebnmbqSMXCfNulIWA1COgfHNbG1Bff/hiMAZY= 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.14 048/100] cpufreq: imx6q: add return value check for voltage scale Date: Thu, 29 Nov 2018 15:12:18 +0100 Message-Id: <20181129140103.350434048@linuxfoundation.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181129140058.768942700@linuxfoundation.org> References: <20181129140058.768942700@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.14-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 14466a9b01c0..63d28323a29c 100644 --- a/drivers/cpufreq/imx6q-cpufreq.c +++ b/drivers/cpufreq/imx6q-cpufreq.c @@ -135,8 +135,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