projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
850ba84
)
ASoC: mmp-sspa: Fix return value check in asoc_mmp_sspa_probe()
author
Wei Yongjun
<weiyongjun1@huawei.com>
Wed, 27 May 2020 03:02:10 +0000
(
03:02
+0000)
committer
Mark Brown
<broonie@kernel.org>
Wed, 27 May 2020 13:48:56 +0000
(14:48 +0100)
In case of error, the function devm_ioremap() returns NULL pointer not
ERR_PTR(). The IS_ERR() test in the return value check should be
replaced with NULL test.
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Link:
https://lore.kernel.org/r/20200527030210.124393-1-weiyongjun1@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/pxa/mmp-sspa.c
patch
|
blob
|
history
diff --git
a/sound/soc/pxa/mmp-sspa.c
b/sound/soc/pxa/mmp-sspa.c
index 3e37ab625f8dac2354d9a099480890006d845801..4255851c71c1b72d2bb87b6a2343d05f4492089e 100644
(file)
--- a/
sound/soc/pxa/mmp-sspa.c
+++ b/
sound/soc/pxa/mmp-sspa.c
@@
-493,13
+493,13
@@
static int asoc_mmp_sspa_probe(struct platform_device *pdev)
return -ENODEV;
sspa->rx_base = devm_ioremap(&pdev->dev, res->start, 0x30);
- if (
IS_ERR(sspa->rx_base)
)
- return
PTR_ERR(sspa->rx_base)
;
+ if (
!sspa->rx_base
)
+ return
-ENOMEM
;
sspa->tx_base = devm_ioremap(&pdev->dev,
res->start + 0x80, 0x30);
- if (
IS_ERR(sspa->tx_base)
)
- return
PTR_ERR(sspa->tx_base)
;
+ if (
!sspa->tx_base
)
+ return
-ENOMEM
;
sspa->clk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(sspa->clk))