Commit f89a8c5b authored by Yang Yingliang's avatar Yang Yingliang Committed by Mark Brown

ASoC: amd: acp: switch to use dev_err_probe()

Use dev_err_probe() to simplify code and print error code.
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20220819073758.1273160-2-yangyingliang@huawei.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 6a4ce20f
...@@ -62,10 +62,9 @@ static int acp_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_id ...@@ -62,10 +62,9 @@ static int acp_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_id
if (!chip) if (!chip)
return -ENOMEM; return -ENOMEM;
if (pci_enable_device(pci)) { if (pci_enable_device(pci))
dev_err(&pci->dev, "pci_enable_device failed\n"); return dev_err_probe(&pci->dev, -ENODEV,
return -ENODEV; "pci_enable_device failed\n");
}
ret = pci_request_regions(pci, "AMD ACP3x audio"); ret = pci_request_regions(pci, "AMD ACP3x audio");
if (ret < 0) { if (ret < 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment