Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4827005ybl; Wed, 22 Jan 2020 05:29:08 -0800 (PST) X-Google-Smtp-Source: APXvYqxOJqOINUxbqpb5KfCkSQk7HLR37JPURR3dt6SiKURIId/DLd/EnF1Bj0wySw9PPoAdPxEA X-Received: by 2002:a05:6830:1501:: with SMTP id k1mr7199825otp.125.1579699748165; Wed, 22 Jan 2020 05:29:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579699748; cv=none; d=google.com; s=arc-20160816; b=YQKT7EoLIGxjLSkHz9QeUhSubcbfmqzWA/eBsSjrGAHYwRkQCR0Z8JtAcChA9BEcZY N2YXpjSz48ADoysix1sahTzVotWS8byQNwvjQ0ejgIYdL304KgLdNs1hf72oHLg9S3Qp qm9zgNmsHt+HX7vuen48nl/52eS2eHbxB1BxL8Po6Rq3Zjfbg8s/ZlfyqRsNifFZSXZg 2kkVq0HovZ2LircaCT4uaMlwdW832vO65s4YIXMJNh3eMoG43MVi4Pfr88KvTIpv+ye4 V4vSEw5b4m9xdGGqivzRU7PxLS+SIMRoclny/Dt+rUHPqdndks9/z4mdNKqoy45MbBlE Jbww== 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=Q5qu/+3u7QqessQFWAtYgK+HSKT7R8bl3d0iNYD6+t4=; b=0L9mmE8XkD55v6YEovFuMwPejPBkKHWLl6UIOWAhtUm0I8sI/d0g5uUs1TJOKvEPNg mLszJJ/H+DGxveuxDko33tG4tsuku/9SGAHrlTK7gzkHphQ5hFBR++OpCYffhuOInpEM D6zYWrquiROJaJSHh49GxuD2tnfRuEzprBSea8XrFcSA2b2hNquTInQ3KfiVbDB1barI QkpUc0yti+ChJJ7hmWgkNt3onUDTR6IEqo+nsrSW7Z7WUeh3Zy2yzyMcu5cwsxc6v/96 ASwtYClG+S4Ez8w0kqP/1EZk8qCrP4dXzsTsIqqTpDrwlONIOOUHELfIBbvTaWlx7/Dq Y/dw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="Y/YdqlYa"; 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 38si15162746otu.166.2020.01.22.05.28.56; Wed, 22 Jan 2020 05:29: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=@kernel.org header.s=default header.b="Y/YdqlYa"; 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 S1730005AbgAVN2G (ORCPT + 99 others); Wed, 22 Jan 2020 08:28:06 -0500 Received: from mail.kernel.org ([198.145.29.99]:50012 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726061AbgAVN2F (ORCPT ); Wed, 22 Jan 2020 08:28:05 -0500 Received: from localhost (unknown [84.241.205.26]) (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 2C2A0205F4; Wed, 22 Jan 2020 13:28:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579699684; bh=26Ag4a84Mxj1MhMUUa7Ze9eS9NWvIpZnvhk2RsY/vXI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Y/YdqlYaOpPZ2yX77ez8VnX7xeSA9NmgPgj8GCzV2Ose9MpQquacKkn+nIBvbqAsT 6epKaISnqHBKqSs0sRVVI+oL6jX3jrQ8dF/Oig+x3FkGKJ4Xd84pdMOOglgFpbDHEn sYN4FdRfzQkD0TsNOVkpfwD3b4eXenPr8gDmSf+k= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Baolin Wang , Stephen Boyd Subject: [PATCH 5.4 217/222] clk: sprd: Use IS_ERR() to validate the return value of syscon_regmap_lookup_by_phandle() Date: Wed, 22 Jan 2020 10:30:03 +0100 Message-Id: <20200122092849.228738922@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200122092833.339495161@linuxfoundation.org> References: <20200122092833.339495161@linuxfoundation.org> User-Agent: quilt/0.66 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 From: Baolin Wang commit 9629dbdabd1983ef53f125336e1d62d77b1620f9 upstream. 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 Link: https://lkml.kernel.org/r/1995139bee5248ff3e9d46dc715968f212cfc4cc.1570520268.git.baolin.wang@linaro.org Signed-off-by: Stephen Boyd Signed-off-by: Greg Kroah-Hartman --- drivers/clk/sprd/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/clk/sprd/common.c +++ b/drivers/clk/sprd/common.c @@ -46,7 +46,7 @@ int sprd_clk_regmap_init(struct platform 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); }