From: Arnaud Patard (Rtp) Date: Thu, 20 Jun 2013 21:20:49 +0000 (+0200) Subject: ASoC: imx-sgtl5000: return E_PROBE_DEFER if ssi/codec not found X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=28e5ca73ef9072ed58dbb81cfff6f908be8e3cd4;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git ASoC: imx-sgtl5000: return E_PROBE_DEFER if ssi/codec not found If the ssi or codec drivers are not loaded (for instance, because spi or i2c bus drivers are not loaded), returning -EINVAL will for people to unload and then reload the module to get sound working. Returning E_PROBE_DEFER will mitigate this. Signed-off-by: Arnaud Patard Signed-off-by: Mark Brown --- diff --git a/sound/soc/fsl/imx-sgtl5000.c b/sound/soc/fsl/imx-sgtl5000.c index 7a8bc1220b2e..3f726e4f88db 100644 --- a/sound/soc/fsl/imx-sgtl5000.c +++ b/sound/soc/fsl/imx-sgtl5000.c @@ -113,13 +113,13 @@ static int imx_sgtl5000_probe(struct platform_device *pdev) ssi_pdev = of_find_device_by_node(ssi_np); if (!ssi_pdev) { dev_err(&pdev->dev, "failed to find SSI platform device\n"); - ret = -EINVAL; + ret = -EPROBE_DEFER; goto fail; } codec_dev = of_find_i2c_device_by_node(codec_np); if (!codec_dev) { dev_err(&pdev->dev, "failed to find codec platform device\n"); - return -EINVAL; + return -EPROBE_DEFER; } data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);