From patchwork Mon Nov 11 03:44:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "\(Exiting\) Baolin Wang" X-Patchwork-Id: 179051 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp6105915ilf; Sun, 10 Nov 2019 19:46:08 -0800 (PST) X-Google-Smtp-Source: APXvYqz57crtD44mYM/ehV4V7FwQzCKRlGRM0F6cdQasivocub/IuyPiWLqy6a0RjIB1BYzCksJj X-Received: by 2002:aa7:cf8b:: with SMTP id z11mr24112989edx.294.1573443968150; Sun, 10 Nov 2019 19:46:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573443968; cv=none; d=google.com; s=arc-20160816; b=Y8ZzQ+/ywu1Tk16M1RglFYSTcbQopVjh/9wTv2nn1ag7pg1wW/7PiQGgFLCkRdef8F 3OvP7WmafABTq9yXvSdl1EcCCaQ/3fJfzY8KeD+kmToo7Scb5u/8Emq+0eJuyvM8Tr2Z ezsBTqJ+UZtuENhWMkeC8Z1cWA772DoLPNvt+ABsG9GdF73pvip0v7AKVGt/lDTlJ1T3 c6rWauL+9aV8cI2QYq17DEocbgr1zaQgHgV33a9b3I9bcbeSSwMUHcxMJ5fHT1Lvdezw f2REuqviMYrNXUmhzD4cldKlGK6L59wPwAr+7QnCowQ5bMCnVMbdf5Yn+CPuYxFW1SVX NxfQ== 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 :dkim-signature; bh=iYNb5KlZBapqLqV3fFy3XFyweS3E7oV4r+7sy3tLLo0=; b=RTN3NLBkIHN//suMS/qfdoAuns/Dyu5txUWzmhYriMDae5x353LGRIbCKfE+et3f8H uww6WteBvv7HNt8p+IpUdUDncTJ3RaqA5C3VkUiRBgndHTyAtQNRpUxo+pnFTKbL3o/5 B5kiL4jOZ6S8V5hLX6JBXMjhrDPfuQZccgIZwG7p63hW9VMv8T0ZAL+WluYlGzMk70G+ 5iT0TBi6vDXvUppmj7AdOq4dsbJx5K9uQcliRBek9Cjk2Hf4/9VY1+SjDc+6HVKAmtc9 sdLSw7cHt6n/TJUrYXk1P83ocyRISkCB/HQTCJ6C1v8Q6r2JYnm1RLADhaiFxcCtZfIf EHHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=z1fwr7sr; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c5si8388348eja.205.2019.11.10.19.46.07; Sun, 10 Nov 2019 19:46:08 -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=@linaro.org header.s=google header.b=z1fwr7sr; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726853AbfKKDqF (ORCPT + 26 others); Sun, 10 Nov 2019 22:46:05 -0500 Received: from mail-pf1-f195.google.com ([209.85.210.195]:39286 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726749AbfKKDqF (ORCPT ); Sun, 10 Nov 2019 22:46:05 -0500 Received: by mail-pf1-f195.google.com with SMTP id x28so9720773pfo.6 for ; Sun, 10 Nov 2019 19:46:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=iYNb5KlZBapqLqV3fFy3XFyweS3E7oV4r+7sy3tLLo0=; b=z1fwr7srPfOHKcCg+EB7uGeAeLy/NhL9Tzjpgo5imxvgvf37LONrCOJqX/U0K86hMp qnk3FqLXTLBO2rgeszt051whLIcBOYVcceZRrv21NU7yH3/rXLiGjsgQ/aJPr3UxzHss VXsYOVSbzwJ/c3wSHSalVkDvDgDuBZPeCzUGDkUaKueUV+bKTSmA+326air3MYjNQmDX dva6B0twiEqteRjfd4dgHRp4kOdUV2J6RqiXZFTJSmMTWvOYcrXbPJ4+PD0arSKwhT1V 1ePoa/KfaTrSV1F2GJ2PBerQafNuvbt4Je8+uQ+qeCUOreQdLq4BqiBcgf9g/BNNG0uq cF9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=iYNb5KlZBapqLqV3fFy3XFyweS3E7oV4r+7sy3tLLo0=; b=kPagXq3lKXz4vXnN7EIqZ4/XzDHknWfIqbn1GRM6dy2XSefqpP6+PFTV6HFSQxP7Re DRC5kuSD9uteztaldthgX5fXdVJrqdnH2++J4BdvewmIw1DxPkF5KCUMm5uoB+SB0DsI QQ5rwKGPQ9pf9xpN60B+6mPjjN8OhjP4N1E4GP6usbbCPpVFAq/k3LWl+qKLt7PMMFzT IHiagYVqc2DdznlcP9fuLkhfSDgP7R2j20CmYdBcfUl6MJxKuYqWN8j1xp29/f0DZ7D7 6VzVci/k+sIZvj3iti1GF0RQTlkgZdmBrWkV5SfimrgR+eXqgoEj5/eed/Q+BWBJwGUD Kj4w== X-Gm-Message-State: APjAAAXwQ81Qd5OpcSnhUe80lIee/qe17B8OCu2nIt8wTKigXoBIhlDY 9NYTSN6KN8WPFDWXN9hHkxSyMA== X-Received: by 2002:a65:6418:: with SMTP id a24mr27407571pgv.260.1573443962707; Sun, 10 Nov 2019 19:46:02 -0800 (PST) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id y3sm11707945pgl.78.2019.11.10.19.45.58 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 10 Nov 2019 19:46:01 -0800 (PST) From: Baolin Wang To: mturquette@baylibre.com, sboyd@kernel.org Cc: orsonzhai@gmail.com, baolin.wang@linaro.org, baolin.wang7@gmail.com, zhang.lyra@gmail.com, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RESEND PATCH v2] clk: sprd: Use IS_ERR() to validate the return value of syscon_regmap_lookup_by_phandle() Date: Mon, 11 Nov 2019 11:44:55 +0800 Message-Id: X-Mailer: git-send-email 1.7.9.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The syscon_regmap_lookup_by_phandle() will never return NULL, thus use IS_ERR() to validate the return value instead of IS_ERR_OR_NULL(). Fixes: d41f59fd92f2 ("clk: sprd: Add common infrastructure") Signed-off-by: Baolin Wang --- Changes from v1: - Add fixes tag. --- drivers/clk/sprd/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 1.7.9.5 diff --git a/drivers/clk/sprd/common.c b/drivers/clk/sprd/common.c index 3718696..c0af477 100644 --- a/drivers/clk/sprd/common.c +++ b/drivers/clk/sprd/common.c @@ -45,7 +45,7 @@ int sprd_clk_regmap_init(struct platform_device *pdev, if (of_find_property(node, "sprd,syscon", NULL)) { regmap = syscon_regmap_lookup_by_phandle(node, "sprd,syscon"); - if (IS_ERR_OR_NULL(regmap)) { + if (IS_ERR(regmap)) { pr_err("%s: failed to get syscon regmap\n", __func__); return PTR_ERR(regmap); }