Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1675600ybv; Thu, 6 Feb 2020 07:56:47 -0800 (PST) X-Google-Smtp-Source: APXvYqwRA69ID8Gmk6eNMmIQaFbBodjkmnTi8RJAWAaWNxbOOzp1WNSr4WLu800XPWO6dE76DQ09 X-Received: by 2002:a54:410e:: with SMTP id l14mr7281695oic.42.1581004607113; Thu, 06 Feb 2020 07:56:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581004607; cv=none; d=google.com; s=arc-20160816; b=0Q5wGBvwRWm7XjMkwKRcXlzh/MvFhG9W3uoNBQ/xEQbgS3GlUvKN06NJdLIL0NC/V1 Kf5ltC/qomnag3GGCe87uKnIYcx8Zzt3L5+g/cKJjNd7Qms2K9DMG52znuZcJdCSkd39 CJUz8tPceCwdm84QGrD3zGnaR70z33fGdAHxs9RBSZToDt5QWsXN7OHAg+wGysWtEuVs Nt9G4cZaR/GBUl+6r9d+NLMFep/CiXGeFcvUPwmr5M9bg/POoAK/hU3Wqm6w0/fmjpDU Tv2KR/RzFi3hFVgC44M1p4kLfwe6Dv/2LW7DnX62oQeV90efPrRkelEO0OpI9Jym3u91 raew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:message-id:in-reply-to:subject:cc:to :from:dkim-signature; bh=eFZpDdmMDc+jg0LQsv6cOH8jUl8NU8Wb3prM5WogJw4=; b=BkkVvMVxEpsde0uDlRTzDXR1M6oGwLoSC8URwekhVLkrmRyO+ts7hk93DuHLq9xdEs VOLblVZvNgSuMBQGnoL60ozZwoY+lfsRuTVuEHszf2Gc5Qea6RvyaGocJ51+KXKqf3wt DK0KGzwZ4SbBVBT6I5/dCIEK/jcYqqvmmw23nsQgs4fVDD7LSAWMZAvVtIPg2/e+yM6c D/x3pzVGh7/srtT/zaMZ1d4kzucX/xKoWcdalY8Nauesk5fr1tnK0b3Eo1mOrjExXO32 HJ3zr5n8Isq6LdCHf9ClO2MoGa8ShRLjjivT6J/hl1xTnXzQ5aFTaic7Cc7WItQcLx5I 6Asw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=CZkbK093; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m25si2360742otn.208.2020.02.06.07.56.35; Thu, 06 Feb 2020 07:56:47 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=CZkbK093; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727684AbgBFPzK (ORCPT + 99 others); Thu, 6 Feb 2020 10:55:10 -0500 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:48644 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727389AbgBFPzJ (ORCPT ); Thu, 6 Feb 2020 10:55:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Date:Message-Id:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner: List-Archive; bh=eFZpDdmMDc+jg0LQsv6cOH8jUl8NU8Wb3prM5WogJw4=; b=CZkbK0934Flb PlFSFEfPcSC1DjY1rrTXiRvPEKG+WXzVzsaZIi6UK4y2ymJdtolZb3Irl4t3RaVV79EDZ6Ar1PqD3 8Kpfxol4XRvMuLUI15TW/hU8ZpTWH9TaeosaZplboZyJQrJ5Iv6EEn1Q7CUHw7TY3WrSuoJSg4uUo 5UJAA=; Received: from fw-tnat-cam2.arm.com ([217.140.106.50] helo=fitzroy.sirena.org.uk) by heliosphere.sirena.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1izjUL-0002lU-O2; Thu, 06 Feb 2020 15:54:45 +0000 Received: by fitzroy.sirena.org.uk (Postfix, from userid 1000) id 29824D02A55; Thu, 6 Feb 2020 15:54:45 +0000 (GMT) From: Mark Brown To: Oleksandr Suvorov Cc: alsa-devel@alsa-project.org, Daniel Baluta , Fabio Estevam , Igor Opaniuk , Jaroslav Kysela , Liam Girdwood , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Marcel Ziswiler , Mark Brown , Nicolin Chen , Philippe Schenker , Shengjiu Wang , Takashi Iwai , Timur Tabi , Xiubo Li Subject: Applied "ASoC: fsl_sai: Fix exiting path on probing failure" to the asoc tree In-Reply-To: <20200205160436.3813642-1-oleksandr.suvorov@toradex.com> Message-Id: X-Patchwork-Hint: ignore Date: Thu, 6 Feb 2020 15:54:45 +0000 (GMT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The patch ASoC: fsl_sai: Fix exiting path on probing failure has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.6 All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark From d1520889782dff58610c0b6b54d4cf3211ceb690 Mon Sep 17 00:00:00 2001 From: Oleksandr Suvorov Date: Wed, 5 Feb 2020 18:04:36 +0200 Subject: [PATCH] ASoC: fsl_sai: Fix exiting path on probing failure If the imx-sdma driver is built as a module, the fsl-sai device doesn't disable on probing failure, which causes the warning in the next probing: ================================================================== fsl-sai 308a0000.sai: Unbalanced pm_runtime_enable! fsl-sai 308a0000.sai: Unbalanced pm_runtime_enable! fsl-sai 308a0000.sai: Unbalanced pm_runtime_enable! fsl-sai 308a0000.sai: Unbalanced pm_runtime_enable! fsl-sai 308a0000.sai: Unbalanced pm_runtime_enable! fsl-sai 308a0000.sai: Unbalanced pm_runtime_enable! ================================================================== Disabling the device properly fixes the issue. Fixes: 812ad463e089 ("ASoC: fsl_sai: Add support for runtime pm") Signed-off-by: Oleksandr Suvorov Link: https://lore.kernel.org/r/20200205160436.3813642-1-oleksandr.suvorov@toradex.com Signed-off-by: Mark Brown --- sound/soc/fsl/fsl_sai.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c index 8c3ea7300972..9d436b0c5718 100644 --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c @@ -1020,12 +1020,24 @@ static int fsl_sai_probe(struct platform_device *pdev) ret = devm_snd_soc_register_component(&pdev->dev, &fsl_component, &fsl_sai_dai, 1); if (ret) - return ret; + goto err_pm_disable; - if (sai->soc_data->use_imx_pcm) - return imx_pcm_dma_init(pdev, IMX_SAI_DMABUF_SIZE); - else - return devm_snd_dmaengine_pcm_register(&pdev->dev, NULL, 0); + if (sai->soc_data->use_imx_pcm) { + ret = imx_pcm_dma_init(pdev, IMX_SAI_DMABUF_SIZE); + if (ret) + goto err_pm_disable; + } else { + ret = devm_snd_dmaengine_pcm_register(&pdev->dev, NULL, 0); + if (ret) + goto err_pm_disable; + } + + return ret; + +err_pm_disable: + pm_runtime_disable(&pdev->dev); + + return ret; } static int fsl_sai_remove(struct platform_device *pdev) -- 2.20.1