lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250901151513.286454-1-daniel.baluta@nxp.com>
Date: Mon,  1 Sep 2025 18:15:13 +0300
From: Daniel Baluta <daniel.baluta@....com>
To: broonie@...nel.org
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,
	Daniel Baluta <daniel.baluta@....com>
Subject: [PATCH] ASoC: SOF: imx: Fix devm_ioremap_resource check

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.

Fixes: bc163baef570 ("ASoC: Use of_reserved_mem_region_to_resource() for "memory-region"")
Signed-off-by: Daniel Baluta <daniel.baluta@....com>
---
 sound/soc/sof/imx/imx-common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/sof/imx/imx-common.c b/sound/soc/sof/imx/imx-common.c
index 40debc541bf9..b3248c65215d 100644
--- a/sound/soc/sof/imx/imx-common.c
+++ b/sound/soc/sof/imx/imx-common.c
@@ -316,7 +316,7 @@ static int imx_parse_ioremap_memory(struct snd_sof_dev *sdev)
 		}
 
 		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",
-- 
2.45.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ