[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a36b4c70-2ed0-4292-afca-7ecfe0207260@sirena.org.uk>
Date: Mon, 1 Sep 2025 16:35:13 +0100
From: Mark Brown <broonie@...nel.org>
To: Daniel Baluta <daniel.baluta@....com>
Cc: linux-sound@...r.kernel.org, imx@...ts.linux.dev,
linux-kernel@...r.kernel.org, Frank.Li@....com, robh@...nel.org,
laurentiu.mihalcea@....com, dan.carpenter@...aro.org,
waqar.hameed@...s.com, festevam@...il.com, kernel@...gutronix.de,
lgirdwood@...il.com, peter.ujfalusi@...ux.intel.com,
yung-chuan.liao@...ux.intel.com, ranjani.sridharan@...ux.intel.com,
kai.vehmanen@...ux.intel.com
Subject: Re: [PATCH] ASoC: SOF: imx: Fix devm_ioremap_resource check
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.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists