Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9175378pxu; Mon, 28 Dec 2020 08:27:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJzsNX+yrE0S6iWfVD06F3vdE5xD7Wcbza1SrgD+V/5grnFz6+ZcCX1clx5YOfMfV1KR50WG X-Received: by 2002:a17:906:c414:: with SMTP id u20mr41513098ejz.511.1609172822581; Mon, 28 Dec 2020 08:27:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609172822; cv=none; d=google.com; s=arc-20160816; b=q+PensqQMtVrm8L1LAQXf7bFFFNi0Uo0ETwoGouHdJFnyJJUuJLLVOXQ7Alt7lTZJC faUUFAXQIW3W58gJH+ySB3gFYcdP+r0ndMGkZ2kBrHScAJS7Ir1zplXmQHdS5Cec36xy dIlQ376pqTq6TOeiQ/VKAtvhQ+IrQnlJ4NBSDdXMW1UASg4vewp8F6yoH6lUkPLlNype reijnQvPp90y0XoHhpO1VEFyqJkasHUftt7P84s9YyoEgiRBtPL/mM5yqQuBMTOk7UCx WTjDdsR+2aHoxJboMrS1ZFRC0wIoDvrR0AeWOWkis2woLsTg+hLOZhyOze+NnspyTyQo PeHg== 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=PpRlpqLfNLAwkI/vx/XgWNjeXtGza/8YNelMBrbvfk0=; b=KIKcaXToiqx31KlAsO7+94/Ca/zg2DzVzYbRJCZQPQABHog8pVxUkazn4q9bbrLTf5 /7uQth+zOLf345kFsBm3TP3WSCSRfTgQSi/pn21yft1a/Les/cPSnIsXj3ExxY34Hugx WJvnavJTbm502ZFm/KC9ZLWwfzqHwdJGMd0oTmoOypaKIBfWLEmtSpnvF5z2jtogIOG+ 0BVaEX8+a74/bjmEB44aZW5p5/8rAT1+d9zcO1SM/mCQmZcUygKZkGh9LWvxqZuf8mws e0WcJ007GBaMo4IF6n1f8FWJNflSFrDj9kNVfXA6ht4kutHNmqa4cGUbxrZMZL/z1Q2/ Uu5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=iEYkk4iw; 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 zc2si18323659ejb.427.2020.12.28.08.26.39; Mon, 28 Dec 2020 08:27:02 -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=iEYkk4iw; 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 S2391437AbgL1QXz (ORCPT + 99 others); Mon, 28 Dec 2020 11:23:55 -0500 Received: from mail.kernel.org ([198.145.29.99]:39566 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730117AbgL1NLg (ORCPT ); Mon, 28 Dec 2020 08:11:36 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 93C58208BA; Mon, 28 Dec 2020 13:10:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609161056; bh=dXkCDmG6F/mAODuZ3uIxXPadXIBMnnqmj+jRl1Z/38E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iEYkk4iwC59VFKZKp/c5SYy3qyB6iTbpSXi6yKBlVOtTC7DG/1mI7kj73BSu1z3di YcKO7qF8580ME+gTQ+fwDgAiaQarcGe+nlusJQmEO0uV57rCPU3hWJG3PeB6hYWKSM l/St3lFA/5SY67Wm/HUoRG+IOKTWkuf5RVL7FKhI= 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 4.14 086/242] ASoC: wm8998: Fix PM disable depth imbalance on error Date: Mon, 28 Dec 2020 13:48:11 +0100 Message-Id: <20201228124908.929096754@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124904.654293249@linuxfoundation.org> References: <20201228124904.654293249@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 44f447136e224..a94e0aeb2e198 100644 --- a/sound/soc/codecs/wm8998.c +++ b/sound/soc/codecs/wm8998.c @@ -1425,7 +1425,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 = snd_soc_register_codec(&pdev->dev, &soc_codec_dev_wm8998, wm8998_dai, ARRAY_SIZE(wm8998_dai)); @@ -1438,6 +1438,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