Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp3362139ybh; Mon, 16 Mar 2020 21:54:43 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsC9XAMwYARsQ2zpdwY8aBWXPbAiKTizevwViVjCNyhC6bkKv5AKpKXAwbxXA062Ky+2Ayg X-Received: by 2002:a9d:814:: with SMTP id 20mr2138645oty.313.1584420883054; Mon, 16 Mar 2020 21:54:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584420883; cv=none; d=google.com; s=arc-20160816; b=sFNIaihFnlnULnFE8njBbkY2O931UpWpTzPITLpEiaQe+9WrzRUU6UpbEheBg4pB+b WYWKLli9SdD+yXi8MVtFZKfBNlO+lFqK0UUwF7A3lIh5clVF1YBTW//gfm1bR1IiDM9N 15A07+bFVWkvNzPnyiQZPPNUanLQBNqIUX5o6ku/y0PeVIxiynqeGsaEqMk3EHzCQiUO v3R56yOb63jDVJadBJDo8CTXCrGtKrvN4Xt4ppwuGH5lwUJ1Luc1bLo0Kso8tuQpd9la 0IIDihQTFWCIaLHw/Nl4zJgrfYI8Egqm+lgGVgSeFBaWbLH2bXCMT+30WMngBzGRs8Gv DgKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=p6A8DWky2PKlUupRnOKtr+jwYS/jD9KUURksBLU8ugE=; b=I3eK0ZQWI49ojqbGOz2c5HJy12u8N2V/d4m9WG4iVJTuXIUl8LAIMjw6esf613uXpA vD6Vo12P7VXThVWlDxZu//WNMvlLTaToVn3kLc3HmzXcbIgcggbRnDPpZX8f2hM6nBSR h4rVDpv8os45xAySrX7M1B6DG4GAMco1un6IWii4cg0gTekEyi9lzIlPjjHp89GCFdj1 5MiZBFdyugfJBxD9dv3ImDalUq4wrLwWu1zMDZVaDD7190m6eltgwCRedSmxnYyq6Dfq C/gEKvqxMHpHzkanoEBigUHqNVjz/1q8WM4XQ4G8yNl2Ye9uD/a8jkCIweOCBKcXY16P C/1w== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i2si21596oif.204.2020.03.16.21.54.31; Mon, 16 Mar 2020 21:54:43 -0700 (PDT) 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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726712AbgCQEpo (ORCPT + 99 others); Tue, 17 Mar 2020 00:45:44 -0400 Received: from inva021.nxp.com ([92.121.34.21]:34630 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725536AbgCQEpo (ORCPT ); Tue, 17 Mar 2020 00:45:44 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 9B836200C66; Tue, 17 Mar 2020 05:45:42 +0100 (CET) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 5CF03200CA5; Tue, 17 Mar 2020 05:45:37 +0100 (CET) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id C14F04029F; Tue, 17 Mar 2020 12:45:30 +0800 (SGT) From: Anson Huang To: rjw@rjwysocki.net, viresh.kumar@linaro.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Linux-imx@nxp.com Subject: [PATCH] cpufreq: imx6q-cpufreq: Improve the logic of -EPROBE_DEFER handling Date: Tue, 17 Mar 2020 12:38:54 +0800 Message-Id: <1584419934-2303-1-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Improve the -EPROBE_DEFER handling logic to simplify the code. Signed-off-by: Anson Huang --- drivers/cpufreq/imx6q-cpufreq.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/cpufreq/imx6q-cpufreq.c b/drivers/cpufreq/imx6q-cpufreq.c index 285b8e9..fdb2fff 100644 --- a/drivers/cpufreq/imx6q-cpufreq.c +++ b/drivers/cpufreq/imx6q-cpufreq.c @@ -400,11 +400,9 @@ static int imx6q_cpufreq_probe(struct platform_device *pdev) ret = imx6q_opp_check_speed_grading(cpu_dev); } if (ret) { - if (ret == -EPROBE_DEFER) - goto out_free_opp; - - dev_err(cpu_dev, "failed to read ocotp: %d\n", - ret); + if (ret != -EPROBE_DEFER) + dev_err(cpu_dev, "failed to read ocotp: %d\n", + ret); goto out_free_opp; } -- 2.7.4