From: Mark Brown <broonie@kernel.org>
To: Daniel Baluta <daniel.baluta@nxp.com>
Cc: linux-sound@vger.kernel.org, imx@lists.linux.dev,
linux-kernel@vger.kernel.org, Frank.Li@nxp.com, robh@kernel.org,
laurentiu.mihalcea@nxp.com, dan.carpenter@linaro.org,
waqar.hameed@axis.com, festevam@gmail.com, kernel@pengutronix.de,
lgirdwood@gmail.com, peter.ujfalusi@linux.intel.com,
yung-chuan.liao@linux.intel.com,
ranjani.sridharan@linux.intel.com, kai.vehmanen@linux.intel.com
Subject: Re: [PATCH] ASoC: SOF: imx: Fix devm_ioremap_resource check
Date: Mon, 1 Sep 2025 16:35:13 +0100 [thread overview]
Message-ID: <a36b4c70-2ed0-4292-afca-7ecfe0207260@sirena.org.uk> (raw)
In-Reply-To: <20250901151513.286454-1-daniel.baluta@nxp.com>
[-- Attachment #1: Type: text/plain, Size: 545 bytes --]
On Mon, Sep 01, 2025 at 06:15:13PM +0300, Daniel Baluta wrote:
> devm_ioremap_resource does not return NULL on error
> but an error pointer so we need to use IS_ERR to check
> the return code.
> sdev->bar[blk_type] = devm_ioremap_resource(sdev->dev, res);
> - if (!sdev->bar[blk_type])
> + if (IS_ERR(sdev->bar[blk_type]))
> return dev_err_probe(sdev->dev,
> -ENOMEM,
> "failed to ioremap %s region\n",
If it's returning an error code we should feed that into dev_err_probe()
rather than hard coding to -ENOMEM.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2025-09-01 15:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-01 15:15 Daniel Baluta
2025-09-01 15:35 ` Mark Brown [this message]
2025-09-02 6:33 ` Dan Carpenter
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=a36b4c70-2ed0-4292-afca-7ecfe0207260@sirena.org.uk \
--to=broonie@kernel.org \
--cc=Frank.Li@nxp.com \
--cc=dan.carpenter@linaro.org \
--cc=daniel.baluta@nxp.com \
--cc=festevam@gmail.com \
--cc=imx@lists.linux.dev \
--cc=kai.vehmanen@linux.intel.com \
--cc=kernel@pengutronix.de \
--cc=laurentiu.mihalcea@nxp.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=peter.ujfalusi@linux.intel.com \
--cc=ranjani.sridharan@linux.intel.com \
--cc=robh@kernel.org \
--cc=waqar.hameed@axis.com \
--cc=yung-chuan.liao@linux.intel.com \
/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®