Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1071747ybg; Wed, 3 Jun 2020 23:38:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxKAfXE79f/8OQyHhP27IWmgejU9wMdRjrLmqcEdHuuqMmbsoSSD8FdCxGYICUyIXdc44le X-Received: by 2002:a17:906:5785:: with SMTP id k5mr2529589ejq.494.1591252706358; Wed, 03 Jun 2020 23:38:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591252706; cv=none; d=google.com; s=arc-20160816; b=KlOuw9lUmNBtRm9CdvQ/5PD01o857dEn+spi2ylr6Kk7oBTEESt5sfz14Mh8Yf4p98 SbI/XSMQtt6mi7S6bjjWRqCzj28JwqYw9lFiEtzKZEUfugfiTexlcm3BE26HKH3mKcOD cks1Wbc+BVJNaiVfHF7V4doqaaIRaepk4/yLAD5V/DVW3F8izvpqosVNMbfXtEcP5mjD TI8VrVQK7wvw8B8NCLxMLHqk38vhnjnt+3UJTViMeaoUYEj3WtbabXODU00OT7JIiqbA kdCvu2tiWYkRUytUdPfhD4Dy5oBNdM1qR4SLTzX+1AbCf5TzWmxmMudH9yd8VdMWoiGk ds5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:to:from; bh=ofP7shCUpVeUghDxSoLPLqMavGzYMePmGBmJ96eWCec=; b=DI70HUpoHJVMguk8Yz+NjdMs/RvT7FLbbEGAv8F95V+No7NcYTeiR50E4RPgrVSruD 25zaYeWS/ve6/yWv867b/DQf9tYZtdX6dwt169YembUKHqpW+khEw4ab1ojurX1DvXvx 3ALwEOmbBn6D9LBiYRey6Hv832DjjeB7GGydqTvngT0Njxc9Tj3kbZhuz2LrEriDo/fV QR0BfZQU+bjgOZ37hLlAzpMQifG4r1NM3XFcx0PQ6vRWKGgBWfie+2Jv1H2rFk6Ke057 HZ/gJfKvSRrpt6Jv+ugkZVIUnxw4f3xnBvkgmSez9x47UfZHOcINrxhSppIwSnV7MZEF Vjnw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o25si1167286eja.361.2020.06.03.23.38.03; Wed, 03 Jun 2020 23:38:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726592AbgFDGgE (ORCPT + 99 others); Thu, 4 Jun 2020 02:36:04 -0400 Received: from inva021.nxp.com ([92.121.34.21]:45908 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726248AbgFDGgE (ORCPT ); Thu, 4 Jun 2020 02:36:04 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id BF60B20116D; Thu, 4 Jun 2020 08:36:02 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 4017C201020; Thu, 4 Jun 2020 08:35:58 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 25296402A5; Thu, 4 Jun 2020 14:35:52 +0800 (SGT) From: Shengjiu Wang To: timur@kernel.org, nicoleotsuka@gmail.com, Xiubo.Lee@gmail.com, festevam@gmail.com, lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH] ASoC: fsl-asoc-card: Defer probe when fail to find codec device Date: Thu, 4 Jun 2020 14:25:30 +0800 Message-Id: <1591251930-4111-1-git-send-email-shengjiu.wang@nxp.com> X-Mailer: git-send-email 2.7.4 X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Defer probe when fail to find codec device, because the codec device maybe probed later than machine driver. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl-asoc-card.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c index cf4feb835743..00be73900888 100644 --- a/sound/soc/fsl/fsl-asoc-card.c +++ b/sound/soc/fsl/fsl-asoc-card.c @@ -581,7 +581,7 @@ static int fsl_asoc_card_probe(struct platform_device *pdev) if (!fsl_asoc_card_is_ac97(priv) && !codec_dev) { dev_err(&pdev->dev, "failed to find codec device\n"); - ret = -EINVAL; + ret = -EPROBE_DEFER; goto asrc_fail; } -- 2.21.0