Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2072738pxa; Fri, 7 Aug 2020 02:20:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz155gz1hetp77u+2uye8/3WHF5OFjL2edUs8crR3eQyywTbfFG4ner//IRpB3aQ/M66OcE X-Received: by 2002:a17:906:5902:: with SMTP id h2mr8854020ejq.423.1596792026651; Fri, 07 Aug 2020 02:20:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596792026; cv=none; d=google.com; s=arc-20160816; b=eNDQWqYUMR+C/YOkRvZiYhntw9pRq6l8duwpfMQzEv5ebIsZ3mcnsZTan6X1IOEed1 Z5PMWFWW9Uk5vcTVjuZ9YRjS042lATMiG2I2JFzOuy4NcJs+Ap00b26pCogqNdJrQmhV xzMyIEEC31fRyI/QPmG026D2oCYrKM/NLTuDHQAD4CKjPFl/Q+ndiO0vBa8G5V7/6vBo aU8Po73d+P+KDMJutoTqKtuXSc6aPS+j2o7kiFV7d9leMtnMvB9XMil+Hvkd9oaExKIC 32TMOR7gb7OnKYumUZzlVAjnowEoYYX4Fl4ipUVEuRXXFn7Yq0uGJmd5HiheYIxFJ+6/ J96g== 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=XSeBSiOS9nE5+39sUx5cZBwbDJWa300Uf91CR97FS2Y=; b=n8OV/jOYKfa/YLsFytHx3coMe4YZdrItxiiIjpMEU4ACEasYghkJ26mVlm6tACCqc5 YluKm8Et7FCIGUBJEv0MTAJtwxziiKqv/n8IIYC0w532yeCUUngiACA/+BYpjS+keFPH djixVvP4x1IUtkVl0B9vBE4QgzmFDMKHYG2YWvlKfDbuvch8Z18X1ULsGrwAQWa0ijHH b60nhY/GKZZyTpDieLoV1rkB83D+fRKNjVBK/iTAxLdjCH62Pw1Di6R50KpJaH5kUXif u1u8d7CaVg2Wke6j6AK5EnB6FM9NS/HIptaXUvf2GgxJbtStd8+FJ1k+9uDe+FXKpYZ4 U1Hw== 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 gv12si4821229ejb.430.2020.08.07.02.20.03; Fri, 07 Aug 2020 02:20: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 S1727042AbgHGJTb (ORCPT + 99 others); Fri, 7 Aug 2020 05:19:31 -0400 Received: from inva021.nxp.com ([92.121.34.21]:33962 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726923AbgHGJTb (ORCPT ); Fri, 7 Aug 2020 05:19:31 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id B7324200051; Fri, 7 Aug 2020 11:19:29 +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 3C412200B3D; Fri, 7 Aug 2020 11:19:25 +0200 (CEST) Received: from 10.192.242.69 (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 554EC4024E; Fri, 7 Aug 2020 11:19:19 +0200 (CEST) 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_sai: Add -EPROBE_DEFER check for regmap init Date: Fri, 7 Aug 2020 17:14:42 +0800 Message-Id: <1596791682-4311-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 Regmap initialization may return -EPROBE_DEFER for clock may not be ready, so check -EPROBE_DEFER error type before start another Regmap initialization. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_sai.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c index a22562f2df47..eb933fe9b6d1 100644 --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c @@ -927,7 +927,7 @@ static int fsl_sai_probe(struct platform_device *pdev) "bus", base, &fsl_sai_regmap_config); /* Compatible with old DTB cases */ - if (IS_ERR(sai->regmap)) + if (IS_ERR(sai->regmap) && PTR_ERR(sai->regmap) != -EPROBE_DEFER) sai->regmap = devm_regmap_init_mmio_clk(&pdev->dev, "sai", base, &fsl_sai_regmap_config); if (IS_ERR(sai->regmap)) { -- 2.27.0