Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9265245pxu; Mon, 28 Dec 2020 10:50:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJz9cjrMd2RlCkK3ZqujYrpUSRi0fskPdMFnCs+xtEmQa09uSmV8g1juMDZebSLxNIMgLtQq X-Received: by 2002:a17:906:3b5b:: with SMTP id h27mr42043765ejf.450.1609181418443; Mon, 28 Dec 2020 10:50:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609181418; cv=none; d=google.com; s=arc-20160816; b=BotDPKwkfKDQFp3eUysuFUeVkntEPwSHt7P7dUVQq4QDy4RVwk0S5PGdGyHllpwGIn mL1KC4F/dZjS2roa++xs9lDKgRXXlV+nhMjZEoklR23+K195mmu+2+oUX02iukCc4Dwe qaPwfZYcCDH302uRsLj7kgTB15s1dth//e5inxJkVQPFB4UqLzWfyj5j8ZScuXU88yo5 AKNebD2hFUrUZEvG4kNCn8uv03uT7bnUNQh9mOJ6sjTjtBIJGYEa9P9n+KFP/y2IQAdu +0taBg7NVWY6TyscrqRtG24JKRFiqDeENOeISvw6749UhVreveAsQlDgcHXGPAdhNrfl YnxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Z4b4BNX7HeIegqemTQLKpYRe571gxB3ScdBIR4EvK0M=; b=0URpmfdP+TBJ1NI9mAd4hqb33s/7sYn18pceABg+4f7UV8tNmuyMbvQ++oRARUxjiP DOWZ8wLWBG98lCzY4h6SKpG+5/q2dGGGTamGgbHhTykmeNxyNtYgB0wiytRRaGsBozP9 0WiRUU902VHgiLlWGEo/XKea5ARhORSOsM88k+vGMLcULc/ukoAb7xfxXhDv7PijVfxe KeLY+QFe6iQuQ4kJEXMasZRXBT48S+7kFoNgnH8IDaLH9HA14ZCoBSdv80Qz+E0mvYeL trs5ei7CfxfEAJ5t1g0ywoci+xdNRzX8N1VR2kymfVlUzTIjG/8gVMo7BuPooNU/QcfE 6s1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wESuu0+u; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d10si20398844edk.240.2020.12.28.10.49.55; Mon, 28 Dec 2020 10:50:18 -0800 (PST) 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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wESuu0+u; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404563AbgL1NoH (ORCPT + 99 others); Mon, 28 Dec 2020 08:44:07 -0500 Received: from mail.kernel.org ([198.145.29.99]:43904 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404463AbgL1Nn0 (ORCPT ); Mon, 28 Dec 2020 08:43:26 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 428EE22A84; Mon, 28 Dec 2020 13:42:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609162965; bh=rpPCfVZQyy01jOPBv/Ni6TGVmXUUZpxrNOG1S3ScqKs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wESuu0+ut90afeCoTWulD8rBiy8aUTHrPgK1QYY0cFCIlv9pX8M+lrgA43YzqY5U0 ssylw6gYEdhpUKC+QypCR0yzNLuPp6z8zkAOfXw+kHa3VmDHa+4MzDuabGnhmnIAp/ EZ4B9m9u9wSclIC4vN9pRIE8J0m4SnFG70CTtAEc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Zhang Qilong , Richard Fitzgerald , Mark Brown , Sasha Levin Subject: [PATCH 5.4 122/453] ASoC: wm8998: Fix PM disable depth imbalance on error Date: Mon, 28 Dec 2020 13:45:58 +0100 Message-Id: <20201228124943.086548002@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124937.240114599@linuxfoundation.org> References: <20201228124937.240114599@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Zhang Qilong [ Upstream commit 193aa0a043645220d2a2f783ba06ae13d4601078 ] The pm_runtime_enable will increase power disable depth. Thus a pairing decrement is needed on the error handling path to keep it balanced according to context. Fixes: 31833ead95c2c ("ASoC: arizona: Move request of speaker IRQs into bus probe") Signed-off-by: Zhang Qilong Reviewed-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20201111041326.1257558-4-zhangqilong3@huawei.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/codecs/wm8998.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/wm8998.c b/sound/soc/codecs/wm8998.c index 7c18992195733..817ccddd63448 100644 --- a/sound/soc/codecs/wm8998.c +++ b/sound/soc/codecs/wm8998.c @@ -1375,7 +1375,7 @@ static int wm8998_probe(struct platform_device *pdev) ret = arizona_init_spk_irqs(arizona); if (ret < 0) - return ret; + goto err_pm_disable; ret = devm_snd_soc_register_component(&pdev->dev, &soc_component_dev_wm8998, @@ -1390,6 +1390,8 @@ static int wm8998_probe(struct platform_device *pdev) err_spk_irqs: arizona_free_spk_irqs(arizona); +err_pm_disable: + pm_runtime_disable(&pdev->dev); return ret; } -- 2.27.0