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:
6a4ce20
)
ASoC: amd: acp: switch to use dev_err_probe()
author
Yang Yingliang
<yangyingliang@huawei.com>
Fri, 19 Aug 2022 07:37:57 +0000
(15:37 +0800)
committer
Mark Brown
<broonie@kernel.org>
Fri, 19 Aug 2022 12:19:57 +0000
(13:19 +0100)
Use dev_err_probe() to simplify code and print error code.
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link:
https://lore.kernel.org/r/20220819073758.1273160-2-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/amd/acp/acp-pci.c
patch
|
blob
|
history
diff --git
a/sound/soc/amd/acp/acp-pci.c
b/sound/soc/amd/acp/acp-pci.c
index
5bb23eb
..
6913506
100644
(file)
--- a/
sound/soc/amd/acp/acp-pci.c
+++ b/
sound/soc/amd/acp/acp-pci.c
@@
-62,10
+62,9
@@
static int acp_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_id
if (!chip)
return -ENOMEM;
- if (pci_enable_device(pci)) {
- dev_err(&pci->dev, "pci_enable_device failed\n");
- return -ENODEV;
- }
+ if (pci_enable_device(pci))
+ return dev_err_probe(&pci->dev, -ENODEV,
+ "pci_enable_device failed\n");
ret = pci_request_regions(pci, "AMD ACP3x audio");
if (ret < 0) {