diff options
author | Dan Carpenter <dan.carpenter@linaro.org> | 2025-02-17 10:32:44 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2025-02-18 16:16:30 +0000 |
commit | b20be2c77ce5341ded1a2d8aec119f6dca8ef1ad (patch) | |
tree | 2e6073b5d1f07c2f5c1b5c6bc23e2720a5c31aaf | |
parent | 3f02dedf1566858736f351a8d4a3ce91375e48f1 (diff) |
ASoC: SOF: imx: Fix an IS_ERR() vs NULL bug in imx_parse_ioremap_memory()
The devm_ioremap() function doesn't return error pointers, it returns
NULL on error. Update the checking to match.
Fixes: 651e0ed391b1 ("ASoC: SOF: imx: introduce more common structures and functions")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://patch.msgid.link/68973636-eab8-4d82-8359-ae2c8f60f261@stanley.mountain
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/sof/imx/imx-common.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/sof/imx/imx-common.c b/sound/soc/sof/imx/imx-common.c index c3594815e60e..ea4651a0995c 100644 --- a/sound/soc/sof/imx/imx-common.c +++ b/sound/soc/sof/imx/imx-common.c @@ -338,9 +338,9 @@ static int imx_parse_ioremap_memory(struct snd_sof_dev *sdev) } sdev->bar[blk_type] = devm_ioremap(sdev->dev, base, size); - if (IS_ERR(sdev->bar[blk_type])) + if (!sdev->bar[blk_type]) return dev_err_probe(sdev->dev, - PTR_ERR(sdev->bar[blk_type]), + -ENOMEM, "failed to ioremap %s region\n", chip_info->memory[i].name); } |