mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 09:04:39 +02:00
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.
While at it also pass the error code to dev_err_probe
to improve logging.
Fixes: bc163baef5 ("ASoC: Use of_reserved_mem_region_to_resource() for "memory-region"")
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Link: https://patch.msgid.link/20250902102101.378809-1-daniel.baluta@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
28edfaa10c
commit
0c28431f6f
|
|
@ -316,9 +316,9 @@ 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,
|
||||
PTR_ERR(sdev->bar[blk_type]),
|
||||
"failed to ioremap %s region\n",
|
||||
chip_info->memory[i].name);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user