Message ID | 49e339d4739e4ae4c92b00c1b2918af0755d4122.1666695221.git.rtanwar@maxlinear.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp939383wru; Tue, 25 Oct 2022 04:07:46 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4TKRULzOelx9neyVWMfu6QfoY/H+v5D9Gt8SFGQVdFBkYmdKUbmWg0bKZLqB5YGVdR21O1 X-Received: by 2002:a17:90b:33cd:b0:20d:9da6:56e3 with SMTP id lk13-20020a17090b33cd00b0020d9da656e3mr74104938pjb.143.1666696066580; Tue, 25 Oct 2022 04:07:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666696066; cv=none; d=google.com; s=arc-20160816; b=IWx8J6onqoNq/RVyHtEkh4SzFqxsM5zhH0By/5LsBpqG2H1rhF1W4KAb23yutuXt4p CyZC8LBXTxjdzhOzLW4BbRIKRvj6q8M/x7p8rz/9t4keKd/7GgvZp8dAg7EwwyyZdo2X Ov3t4qvOr6fPMtatXqKUr0YuSOVmpt/PKw0hwSD7WQ1B63ZNsv3inhKWbXY1RrL8IGLL in9gqt+pDBAYNjlu9QjczpLKZlKcsV/AX89WHr3aLxMNA8s/fFe1f3XJy6U1XPhsQIm0 VV4/51N8PT5pvRkPoAm6m8vO0wAPSZVrt8tY/ObHFPBGVd1Qc7bw6LNDU9p3HmAkpZQa iywg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=7CmpWjF+tdyh105skX48laQa4/MYRdbS099VgNPfZ0c=; b=aibXiSWzsKX2oWqhx+Hf3rdtLAwW1H7u3FLhm51nMg3sLWqno6o+CLLD26FNxfXELW gqBuizN7300CEmy+15YRBcxoiJNb2YSy2WwXfUz+6S86IXfHjxVwCNzGp6VElR4cIBBO BaQka4G0pD9CtwN0NE1gBzHDmzW6g533z4SngtFNstY1u/RRt5PDhhpb0/b38CTYZ3Ce kdktt2pieofIqVbuKJ86vCrg7zLXhyjnKO3eeT7YvzLO/2CEXu1vMx7dLklJ4eoGcYI4 HeCVph35861FvfFfqFWyd9SyQ5o/013kSdby5qmA8BkMGsPUtTdragyuEx0ruSwUGOnQ VxtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@maxlinear.com header.s=selector header.b="QL+Z/tyF"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=maxlinear.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x5-20020aa793a5000000b0056238741ba7si2489093pff.174.2022.10.25.04.07.33; Tue, 25 Oct 2022 04:07:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@maxlinear.com header.s=selector header.b="QL+Z/tyF"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=maxlinear.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232348AbiJYLER (ORCPT <rfc822;lucius.rs.storz@gmail.com> + 99 others); Tue, 25 Oct 2022 07:04:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232399AbiJYLEK (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 25 Oct 2022 07:04:10 -0400 Received: from us-smtp-delivery-115.mimecast.com (us-smtp-delivery-115.mimecast.com [170.10.129.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7931180AE4 for <linux-kernel@vger.kernel.org>; Tue, 25 Oct 2022 04:04:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=maxlinear.com; s=selector; t=1666695849; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7CmpWjF+tdyh105skX48laQa4/MYRdbS099VgNPfZ0c=; b=QL+Z/tyFcq+4yUBxPR7Qmva09UBcYCbhP8dptEF1PGBbqOHx6QwFpdvOGOZSk2S4CMNyp8 yE8r+6Yw+cYafBevopvNGwfk3FPg6Vgj0wGy/lUuJLBOHQFxNVAHBRAMV6edK9z/m/y40m /EpffmsJT5u2a53l+SJmRQo5XyLXzHhzcOnCR/fSohO7L6tFO7guTukHEUCLwTy23SKfDY 5ilfLPFsxJu4vwyMPraycmZprrv+bpQOQx5CFVYLxyGfY0v/EA3TosQqtHG14vrBrLBpmw KMC5XylcCy5PuYzvLxZkG2xlKkhODIXkr02hYnF5QEdxcyU+Jm3nCAlH/Txplg== Received: from mail.maxlinear.com (174-47-1-84.static.ctl.one [174.47.1.84]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id us-mta-387-57sMzBxpPEGF0iddEP81UA-1; Tue, 25 Oct 2022 07:04:07 -0400 X-MC-Unique: 57sMzBxpPEGF0iddEP81UA-1 Received: from sgsxdev001.isng.phoenix.local (10.226.81.111) by mail.maxlinear.com (10.23.38.119) with Microsoft SMTP Server id 15.1.2375.24; Tue, 25 Oct 2022 04:04:04 -0700 From: Rahul Tanwar <rtanwar@maxlinear.com> To: <sboyd@kernel.org>, <dan.carpenter@oracle.com>, <linux-clk@vger.kernel.org>, <yzhu@maxlinear.com> CC: <linux-kernel@vger.kernel.org>, <linux-lgm-soc@maxlinear.com>, "Rahul Tanwar" <rtanwar@maxlinear.com> Subject: [PATCH 1/1] clk: mxl: Fix smatch static checker warning Date: Tue, 25 Oct 2022 19:03:57 +0800 Message-ID: <49e339d4739e4ae4c92b00c1b2918af0755d4122.1666695221.git.rtanwar@maxlinear.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <cover.1666695221.git.rtanwar@maxlinear.com> References: <cover.1666695221.git.rtanwar@maxlinear.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: maxlinear.com Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747657492400196025?= X-GMAIL-MSGID: =?utf-8?q?1747657494777620735?= |
Series |
clk: mxl: Fix smatch static checker warning
|
|
Commit Message
Rahul Tanwar
Oct. 25, 2022, 11:03 a.m. UTC
Commit 036177310bac: ("clk: mxl: Switch from direct readl/writel based IO to
regmap based IO") introduced code resulting in below warning issued by the
smatch static checker.
drivers/clk/x86/clk-lgm.c:441 lgm_cgu_probe()
warn: passing zero to 'PTR_ERR'
Fix the warning by replacing incorrect IS_ERR_OR_NULL() with IS_ERR().
Fixes: 036177310bac: ("clk: mxl: Switch from direct readl/writel based IO to
regmap based IO")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Rahul Tanwar <rtanwar@maxlinear.com>
---
drivers/clk/x86/clk-lgm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
Quoting Rahul Tanwar (2022-10-25 04:03:57) > Commit 036177310bac: ("clk: mxl: Switch from direct readl/writel based IO to > regmap based IO") introduced code resulting in below warning issued by the > smatch static checker. > > drivers/clk/x86/clk-lgm.c:441 lgm_cgu_probe() > warn: passing zero to 'PTR_ERR' > > Fix the warning by replacing incorrect IS_ERR_OR_NULL() with IS_ERR(). > > Fixes: 036177310bac: ("clk: mxl: Switch from direct readl/writel based IO to > regmap based IO") > Reported-by: Dan Carpenter <dan.carpenter@oracle.com> > Signed-off-by: Rahul Tanwar <rtanwar@maxlinear.com> > --- Applied to clk-next BTW, please don't send a cover letter for single patches.
diff --git a/drivers/clk/x86/clk-lgm.c b/drivers/clk/x86/clk-lgm.c index 4de77b2c750d..f69455dd1c98 100644 --- a/drivers/clk/x86/clk-lgm.c +++ b/drivers/clk/x86/clk-lgm.c @@ -436,7 +436,7 @@ static int lgm_cgu_probe(struct platform_device *pdev) ctx->clk_data.num = CLK_NR_CLKS; ctx->membase = syscon_node_to_regmap(np); - if (IS_ERR_OR_NULL(ctx->membase)) { + if (IS_ERR(ctx->membase)) { dev_err(dev, "Failed to get clk CGU iomem\n"); return PTR_ERR(ctx->membase); }