Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2537151imu; Thu, 29 Nov 2018 06:33:58 -0800 (PST) X-Google-Smtp-Source: AFSGD/UdZBos2HhSeKcMiBIz58hFFaVDJw6HE9EO+quA1NmMbsO38oHk9moLTDAoxy9rB6jz/zrd X-Received: by 2002:a17:902:b943:: with SMTP id h3mr1745900pls.12.1543502038087; Thu, 29 Nov 2018 06:33:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543502038; cv=none; d=google.com; s=arc-20160816; b=t61a/HTx/ZMvOxZ8bDO5khgXb7KmitHpOxlvMueg73qI1YUFkre4POqouguwE0c7Fr R6sq5fJjWKnmWpy5aEW1rlDWzY3EW9g4M/j92vEih7in2lpOBq4YEaPV4iSwE9OFxdlV L353jVSlN2SpRXoBUjjEh6GWcEQC2f0JeywnXurg8zkt0Bcxr6ji+UHYHRUKtUbjXQTr NAD4wyDf1j/fREGc0yt9p6CF42PtgQpI5ouASHQAyPS3uGSMBaoYNxUai32zaoaQMS33 poZXM4C4rKrRmvjisIFDwwu8iIMYcVbwxAiV7hzcsLkoVC9qYeKPjIGe3XCnOaj1tEN8 F+cQ== 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=6Q3FGxrd9SwFf8x1+TSniBlThrWbsjJBnpNkxmLLqeY=; b=LhyJDE1knRG3BM22HZWbpPD+oRlxsTbLzjW84Ysqe7m4Wug7XabyMapENgxeq7zcVX xhsXacskSoqy8kd2xZN78Kj3Py+wMFZbk6xAhxOUotvY6k+GRbLyR9UTTgrkPEldoLI4 9Bayggdo9lK3ypp0Q+NZnveuu78n9aq0dv/w+aheXAjCeA07QSPHZLFSlEuQUf3Jqs5o uxdEv+H9+WC6et9izTjLW0+qeZ9AiBTiuWrP2bgXGqGz8uUA4+IXB0/FBcA+sTXLiqgh kDoa3VjSOcT2rBbBFivmCd/sF3b07URq7g9nztEkULZOwK5R77Bapnbxp2GshcTC3F5r tyHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ui6zOP3V; 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 i20si2211955pgh.187.2018.11.29.06.33.43; Thu, 29 Nov 2018 06:33:58 -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=ui6zOP3V; 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 S2389045AbeK3Bgn (ORCPT + 99 others); Thu, 29 Nov 2018 20:36:43 -0500 Received: from mail.kernel.org ([198.145.29.99]:39232 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729050AbeK3Bgm (ORCPT ); Thu, 29 Nov 2018 20:36:42 -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 E3FE32146D; Thu, 29 Nov 2018 14:31:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1543501869; bh=D3yIE5WxHEH+n6ciHbvSzz8eRH0DeEvHn08Mt2SrUpY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ui6zOP3VIkWOSoELLPEL9Ru1+oq3g1bmUbW24wAXDSwRP+E0JTgIBDowFIUS5mSgb FUPPT6H7hN+0LXvjK+h44aOBHbs2y4ynGJklpCvQEILmiYnmiqaohXCDBZ2/3t24pU bxJGykcmcBaCrtzHFsPZnIGxlEaLQEeWUjp3Okzc= 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.19 074/110] cpufreq: imx6q: add return value check for voltage scale Date: Thu, 29 Nov 2018 15:12:45 +0100 Message-Id: <20181129135924.244817148@linuxfoundation.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181129135921.231283053@linuxfoundation.org> References: <20181129135921.231283053@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.19-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 b2ff423ad7f8..f4880a4f865b 100644 --- a/drivers/cpufreq/imx6q-cpufreq.c +++ b/drivers/cpufreq/imx6q-cpufreq.c @@ -159,8 +159,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(clks[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