mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-11-01 09:13:37 +00:00
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>
This commit is contained in:
parent
6a4ce20fd7
commit
f89a8c5bb3
1 changed files with 3 additions and 4 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue