diff options
author | Hans de Goede <hdegoede@redhat.com> | 2018-03-04 15:35:58 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-03-07 12:55:40 +0000 |
commit | e39cacc1b7de2a6d72ce49043c9cfd7dd129135a (patch) | |
tree | 08ae6aeb5535b53619c39392b1e3d9d5bb8a4f9b | |
parent | 12af5004145a3fa53246cca4cbb2c57d18dde202 (diff) | |
download | linux-e39cacc1b7de2a6d72ce49043c9cfd7dd129135a.tar.bz2 |
ASoC: Intel: bytcr_rt5651: Not being able to find the codec ACPI-dev is an error
If we cannot find the codec ACPI-dev, then the snd-soc-core will not be
able to find the codec either and snd_soc_register_card() will just keep
exiting with -EPROBE_DEFER, filling the log with errors each time the
probe gets retried.
Instead simply log an error from the machine driver and exit with -ENODEV.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/intel/boards/bytcr_rt5651.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c index 456526a93dd5..105339c5b693 100644 --- a/sound/soc/intel/boards/bytcr_rt5651.c +++ b/sound/soc/intel/boards/bytcr_rt5651.c @@ -540,12 +540,13 @@ static int snd_byt_rt5651_mc_probe(struct platform_device *pdev) /* fixup codec name based on HID */ i2c_name = acpi_dev_get_first_match_name(mach->id, NULL, -1); - if (i2c_name) { - snprintf(byt_rt5651_codec_name, sizeof(byt_rt5651_codec_name), - "%s%s", "i2c-", i2c_name); - - byt_rt5651_dais[dai_index].codec_name = byt_rt5651_codec_name; + if (!i2c_name) { + dev_err(&pdev->dev, "Error cannot find '%s' dev\n", mach->id); + return -ENODEV; } + snprintf(byt_rt5651_codec_name, sizeof(byt_rt5651_codec_name), + "%s%s", "i2c-", i2c_name); + byt_rt5651_dais[dai_index].codec_name = byt_rt5651_codec_name; /* check quirks before creating card */ dmi_check_system(byt_rt5651_quirk_table); |