diff options
author | Mark Brown <broonie@kernel.org> | 2021-06-21 19:16:54 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-06-21 19:16:54 +0100 |
commit | 439779ffd9096526e57994b118a3169c9ec57f72 (patch) | |
tree | 4577035cf74f70670662533e4905d250d89ea973 /sound/soc/fsl/fsl_xcvr.c | |
parent | d7085db6e19237cc4987d5eda95e35b44175a108 (diff) | |
parent | a2f6ed4a44721d3a9fdf4da7e0743cb13866bf61 (diff) |
Merge series "ASoC: fsl: Use devm_platform_get_and_ioremap_resource()" from Yang Yingliang <yangyingliang@huawei.com>:
patch #1 ~ #8:
Use devm_platform_get_and_ioremap_resource()
patch #9
check return value of platform_get_resource_byname()
v2:
change error message in patch #9
Yang Yingliang (9):
ASoC: fsl_asrc: Use devm_platform_get_and_ioremap_resource()
ASoC: fsl_aud2htx: Use devm_platform_get_and_ioremap_resource()
ASoC: fsl_easrc: Use devm_platform_get_and_ioremap_resource()
ASoC: fsl_esai: Use devm_platform_get_and_ioremap_resource()
ASoC: fsl_micfil: Use devm_platform_get_and_ioremap_resource()
ASoC: fsl_sai: Use devm_platform_get_and_ioremap_resource()
ASoC: fsl_spdif: Use devm_platform_get_and_ioremap_resource()
ASoC: fsl_ssi: Use devm_platform_get_and_ioremap_resource()
ASoC: fsl_xcvr: check return value after calling
platform_get_resource_byname()
sound/soc/fsl/fsl_asrc.c | 3 +--
sound/soc/fsl/fsl_aud2htx.c | 3 +--
sound/soc/fsl/fsl_easrc.c | 3 +--
sound/soc/fsl/fsl_esai.c | 3 +--
sound/soc/fsl/fsl_micfil.c | 3 +--
sound/soc/fsl/fsl_sai.c | 3 +--
sound/soc/fsl/fsl_spdif.c | 3 +--
sound/soc/fsl/fsl_ssi.c | 3 +--
sound/soc/fsl/fsl_xcvr.c | 4 ++++
9 files changed, 12 insertions(+), 16 deletions(-)
--
2.25.1
Diffstat (limited to 'sound/soc/fsl/fsl_xcvr.c')
-rw-r--r-- | sound/soc/fsl/fsl_xcvr.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/soc/fsl/fsl_xcvr.c b/sound/soc/fsl/fsl_xcvr.c index 92dd99258edf..fb7c29fc39d7 100644 --- a/sound/soc/fsl/fsl_xcvr.c +++ b/sound/soc/fsl/fsl_xcvr.c @@ -1202,6 +1202,10 @@ static int fsl_xcvr_probe(struct platform_device *pdev) rx_res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "rxfifo"); tx_res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "txfifo"); + if (!rx_res || !tx_res) { + dev_err(dev, "could not find rxfifo or txfifo resource\n"); + return -EINVAL; + } xcvr->dma_prms_rx.chan_name = "rx"; xcvr->dma_prms_tx.chan_name = "tx"; xcvr->dma_prms_rx.addr = rx_res->start; |