diff options
| author | Daniel Baluta <[email protected]> | 2025-09-02 10:21:00 +0000 |
|---|---|---|
| committer | Mark Brown <[email protected]> | 2025-09-02 11:51:32 +0000 |
| commit | 0c28431f6fe13f3a3be0978f79c1a7ae8a93d028 (patch) | |
| tree | 88680f4d424175814fcdbbc1fb9db0fbc10cdf19 /sound/soc/sof/imx/imx-common.c | |
| parent | ASoC: SDCA: Add quirk for incorrect function types for 3 systems (diff) | |
| download | kernel-0c28431f6fe13f3a3be0978f79c1a7ae8a93d028.tar.gz kernel-0c28431f6fe13f3a3be0978f79c1a7ae8a93d028.zip | |
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: bc163baef570 ("ASoC: Use of_reserved_mem_region_to_resource() for "memory-region"")
Signed-off-by: Daniel Baluta <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'sound/soc/sof/imx/imx-common.c')
| -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 f00b381cec3b..d66c198b861a 100644 --- a/sound/soc/sof/imx/imx-common.c +++ b/sound/soc/sof/imx/imx-common.c @@ -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); } |
