From: kbuild test robot <lkp@intel.com>
To: Matthias Brugger <mbrugger@suse.com>
Cc: kbuild-all@lists.01.org,
Enric Balletbo i Serra <enric.balletbo@collabora.com>,
CK Hu <ck.hu@mediatek.com>, Stephen Boyd <sboyd@kernel.org>,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: [PATCH] clk / soc: mediatek: fix ptr_ret.cocci warnings
Date: Sun, 10 May 2020 10:53:38 +0800 [thread overview]
Message-ID: <20200510025338.GA81310@f5ba873997c7> (raw)
In-Reply-To: <202005101033.xLBIJF9V%lkp@intel.com>
From: kbuild test robot <lkp@intel.com>
drivers/soc/mediatek/mtk-mmsys.c:28:1-3: WARNING: PTR_ERR_OR_ZERO can be used
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
Generated by: scripts/coccinelle/api/ptr_ret.cocci
Fixes: 13032709e232 ("clk / soc: mediatek: Move mt8173 MMSYS to platform driver")
CC: Matthias Brugger <mbrugger@suse.com>
Signed-off-by: kbuild test robot <lkp@intel.com>
---
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 30e2206e11ce27ae910cc0dab21472429e400a87
commit: 13032709e2328553970f0002df5edce6aac69425 [1266/7905] clk / soc: mediatek: Move mt8173 MMSYS to platform driver
mtk-mmsys.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
--- a/drivers/soc/mediatek/mtk-mmsys.c
+++ b/drivers/soc/mediatek/mtk-mmsys.c
@@ -25,10 +25,7 @@ static int mtk_mmsys_probe(struct platfo
clks = platform_device_register_data(&pdev->dev, data->clk_driver,
PLATFORM_DEVID_AUTO, NULL, 0);
- if (IS_ERR(clks))
- return PTR_ERR(clks);
-
- return 0;
+ return PTR_ERR_OR_ZERO(clks);
}
static const struct of_device_id of_match_mtk_mmsys[] = {
next parent reply other threads:[~2020-05-10 2:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <202005101033.xLBIJF9V%lkp@intel.com>
2020-05-10 2:53 ` kbuild test robot [this message]
2020-05-10 10:07 ` [PATCH] clk / soc: mediatek: fix ptr_ret.cocci warnings Enric Balletbo i Serra
2020-05-15 11:20 ` Matthias Brugger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200510025338.GA81310@f5ba873997c7 \
--to=lkp@intel.com \
--cc=ck.hu@mediatek.com \
--cc=enric.balletbo@collabora.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=mbrugger@suse.com \
--cc=sboyd@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).