Commit 71869335 authored by Mario Limonciello's avatar Mario Limonciello Committed by Mark Brown

ASoC: amd: Use dev_probe_err helper

Replace the pattern of check for err to match -EPROBE_DEFER and only
output errors to use the dev_err_probe helper instead.
Signed-off-by: default avatarMario Limonciello <mario.limonciello@amd.com>
Link: https://lore.kernel.org/r/20210722132731.13264-2-mario.limonciello@amd.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent af7dc6f1
...@@ -746,15 +746,9 @@ static int cz_probe(struct platform_device *pdev) ...@@ -746,15 +746,9 @@ static int cz_probe(struct platform_device *pdev)
snd_soc_card_set_drvdata(card, machine); snd_soc_card_set_drvdata(card, machine);
ret = devm_snd_soc_register_card(&pdev->dev, card); ret = devm_snd_soc_register_card(&pdev->dev, card);
if (ret) { if (ret) {
if (ret != -EPROBE_DEFER) return dev_err_probe(&pdev->dev, ret,
dev_err(&pdev->dev, "devm_snd_soc_register_card(%s) failed\n",
"devm_snd_soc_register_card(%s) failed: %d\n", card->name);
card->name, ret);
else
dev_dbg(&pdev->dev,
"devm_snd_soc_register_card(%s) probe deferred: %d\n",
card->name, ret);
return ret;
} }
bt_uart_enable = !device_property_read_bool(&pdev->dev, bt_uart_enable = !device_property_read_bool(&pdev->dev,
"bt-pad-enable"); "bt-pad-enable");
......
...@@ -512,17 +512,11 @@ static int acp3x_probe(struct platform_device *pdev) ...@@ -512,17 +512,11 @@ static int acp3x_probe(struct platform_device *pdev)
ret = devm_snd_soc_register_card(&pdev->dev, card); ret = devm_snd_soc_register_card(&pdev->dev, card);
if (ret) { if (ret) {
if (ret != -EPROBE_DEFER) return dev_err_probe(&pdev->dev, ret,
dev_err(&pdev->dev, "devm_snd_soc_register_card(%s) failed\n",
"devm_snd_soc_register_card(%s) failed: %d\n", card->name);
card->name, ret);
else
dev_dbg(&pdev->dev,
"devm_snd_soc_register_card(%s) probe deferred: %d\n",
card->name, ret);
} }
return 0;
return ret;
} }
static const struct acpi_device_id acp3x_audio_acpi_match[] = { static const struct acpi_device_id acp3x_audio_acpi_match[] = {
......
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