summaryrefslogtreecommitdiff
path: root/sound/soc/amd/acp/acp-pci.c
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2022-08-19 10:37:57 +0300
committerMark Brown <broonie@kernel.org>2022-08-19 15:19:57 +0300
commitf89a8c5bb3489e43ff87b5f91acc8db66a168e8e (patch)
treeab2482d38bf754e4f5f3f174033435e6a7d4a668 /sound/soc/amd/acp/acp-pci.c
parent6a4ce20fd776d2fd19ffaf85cf34a53761e2c888 (diff)
downloadlinux-f89a8c5bb3489e43ff87b5f91acc8db66a168e8e.tar.xz
ASoC: amd: acp: switch to use dev_err_probe()
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>
Diffstat (limited to 'sound/soc/amd/acp/acp-pci.c')
-rw-r--r--sound/soc/amd/acp/acp-pci.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sound/soc/amd/acp/acp-pci.c b/sound/soc/amd/acp/acp-pci.c
index 5bb23ebe1216..691350646f1b 100644
--- 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) {