projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
599b101
)
ASoC: amd: acp3x: Fix return value check in acp3x_dai_probe()
author
Wei Yongjun
<weiyongjun1@huawei.com>
Wed, 8 Jan 2020 03:59:54 +0000
(
03:59
+0000)
committer
Mark Brown
<broonie@kernel.org>
Thu, 9 Jan 2020 13:23:43 +0000
(13:23 +0000)
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.
Fixes:
c9fe7db6e884
("ASoC: amd: Refactoring of DAI from DMA driver")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Link:
https://lore.kernel.org/r/20200108035954.51317-1-weiyongjun1@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/amd/raven/acp3x-i2s.c
patch
|
blob
|
history
diff --git
a/sound/soc/amd/raven/acp3x-i2s.c
b/sound/soc/amd/raven/acp3x-i2s.c
index
d9b287b
..
bf51cad
100644
(file)
--- a/
sound/soc/amd/raven/acp3x-i2s.c
+++ b/
sound/soc/amd/raven/acp3x-i2s.c
@@
-321,8
+321,8
@@
static int acp3x_dai_probe(struct platform_device *pdev)
}
adata->acp3x_base = devm_ioremap(&pdev->dev, res->start,
resource_size(res));
- if (
IS_ERR(adata->acp3x_base)
)
- return
PTR_ERR(adata->acp3x_base)
;
+ if (
!adata->acp3x_base
)
+ return
-ENOMEM
;
adata->i2s_irq = res->start;
dev_set_drvdata(&pdev->dev, adata);