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@xxxxxxxxxx>
---
sound/soc/sof/imx/imx-common.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/sof/imx/imx-common.c b/sound/soc/sof/imx/imx-common.c
index 82057af1436c..5a385d140bc7 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);
}
--
2.47.2
[Index of Archives]
[Pulseaudio]
[Linux Audio Users]
[ALSA Devel]
[Fedora Desktop]
[Fedora SELinux]
[Big List of Linux Books]
[Yosemite News]
[KDE Users]