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: 651e0ed391 ("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>
This commit is contained in:
Dan Carpenter
2025-02-17 10:32:44 +03:00
committed by Mark Brown
parent 3f02dedf15
commit b20be2c77c

View File

@@ -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);
}