From: Dan Carpenter <dan.carpenter@linaro.org>
To: oe-kbuild@lists.linux.dev, Peng Fan <peng.fan@nxp.com>
Cc: lkp@intel.com, oe-kbuild-all@lists.linux.dev,
linux-kernel@vger.kernel.org, Shawn Guo <shawnguo@kernel.org>,
Marco Felsch <m.felsch@pengutronix.de>
Subject: drivers/soc/imx/soc-imx8m.c:143 imx8m_soc_prepare() warn: 'drvdata->ocotp_base' from of_iomap() not released on lines: 139.
Date: Mon, 12 Jan 2026 10:57:19 +0300 [thread overview]
Message-ID: <202601111406.ZVV3YaiU-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 755bc1335e3b116b702205b72eb57b7b8aef2bb2
commit: 390c01073f5d0bd64db37926ddb232f33b83620d soc: imx8m: Cleanup with adding imx8m_soc_[un]prepare
config: m68k-randconfig-r072-20260111 (https://download.01.org/0day-ci/archive/20260111/202601111406.ZVV3YaiU-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 14.3.0
smatch version: v0.5.0-8985-g2614ff1a
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
| Closes: https://lore.kernel.org/r/202601111406.ZVV3YaiU-lkp@intel.com/
smatch warnings:
drivers/soc/imx/soc-imx8m.c:143 imx8m_soc_prepare() warn: 'drvdata->ocotp_base' from of_iomap() not released on lines: 139.
vim +143 drivers/soc/imx/soc-imx8m.c
390c01073f5d0b Peng Fan 2025-04-23 119 static int imx8m_soc_prepare(struct platform_device *pdev, const char *ocotp_compatible)
390c01073f5d0b Peng Fan 2025-04-23 120 {
390c01073f5d0b Peng Fan 2025-04-23 121 struct device_node *np __free(device_node) =
390c01073f5d0b Peng Fan 2025-04-23 122 of_find_compatible_node(NULL, NULL, ocotp_compatible);
390c01073f5d0b Peng Fan 2025-04-23 123 struct imx8_soc_drvdata *drvdata = platform_get_drvdata(pdev);
390c01073f5d0b Peng Fan 2025-04-23 124 int ret = 0;
390c01073f5d0b Peng Fan 2025-04-23 125
390c01073f5d0b Peng Fan 2025-04-23 126 if (!np)
390c01073f5d0b Peng Fan 2025-04-23 127 return -EINVAL;
390c01073f5d0b Peng Fan 2025-04-23 128
390c01073f5d0b Peng Fan 2025-04-23 129 drvdata->ocotp_base = of_iomap(np, 0);
390c01073f5d0b Peng Fan 2025-04-23 130 if (!drvdata->ocotp_base)
390c01073f5d0b Peng Fan 2025-04-23 131 return -EINVAL;
390c01073f5d0b Peng Fan 2025-04-23 132
390c01073f5d0b Peng Fan 2025-04-23 133 drvdata->clk = of_clk_get_by_name(np, NULL);
390c01073f5d0b Peng Fan 2025-04-23 134 if (IS_ERR(drvdata->clk)) {
390c01073f5d0b Peng Fan 2025-04-23 135 ret = PTR_ERR(drvdata->clk);
390c01073f5d0b Peng Fan 2025-04-23 136 goto err_clk;
390c01073f5d0b Peng Fan 2025-04-23 137 }
390c01073f5d0b Peng Fan 2025-04-23 138
390c01073f5d0b Peng Fan 2025-04-23 139 return clk_prepare_enable(drvdata->clk);
Call iounmap() if clk_prepare_enable() fails?
390c01073f5d0b Peng Fan 2025-04-23 140
390c01073f5d0b Peng Fan 2025-04-23 141 err_clk:
390c01073f5d0b Peng Fan 2025-04-23 142 iounmap(drvdata->ocotp_base);
390c01073f5d0b Peng Fan 2025-04-23 @143 return ret;
390c01073f5d0b Peng Fan 2025-04-23 144 }
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2026-01-12 7:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-12 7:57 Dan Carpenter [this message]
2026-01-12 9:26 ` Marco Felsch
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=202601111406.ZVV3YaiU-lkp@intel.com \
--to=dan.carpenter@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=m.felsch@pengutronix.de \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=oe-kbuild@lists.linux.dev \
--cc=peng.fan@nxp.com \
--cc=shawnguo@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
all inboxes | Powered by JetHome®