Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9129269pxu; Mon, 28 Dec 2020 07:20:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJzCfVdCvz3k/hmxfk3escilPh4YsRgUrDF9ExpGzfxrajoPQ1LTGjKvmc8P95lfMun3j5Vh X-Received: by 2002:a17:906:a192:: with SMTP id s18mr40232568ejy.249.1609168811316; Mon, 28 Dec 2020 07:20:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609168811; cv=none; d=google.com; s=arc-20160816; b=DNlht16iEP6Ljg/8zmmND9KMwdYd6eSiDDFnsnHaHM0TmZsiJ79f2a68hwEHEvCR/a PT8u2D8hM9sMZpC3UIdcOjz93W74sVD1U1USEiCSehnAQuWRtQXSchf4owIJakUM4lF8 plLaemq5cu+2AhcVXbezt8VDTyBVSKVZ1fUJAS9xPv0d51AgK0tITUZU/7kCQMcckRJy SNiHsBARzV6XBK2iqIutLi4lS8e15OiTZKvyvqdGDMhzvDpQ5EKXGVjp0FZl+rgsddQL 9zVCMsLPZ2xlUFI6Vi9chRRHnBo4lEk+0rS4tvtdv/ksqfQbHJG44s8N+QTbxN5q0ZbG c8CQ== 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=9jp2HRUC6ZkO9J01JqWsTA8mSksseCGW8ka8wFOjyOs=; b=gR6aboH5TcLvrJO95T/pjhEBD2rGshYPDIFaIBH4t0Z6G/+DB9wlu2sD/OovXZQS+7 rQUCR4rPeXZnm8ZsDW7xqslBUrVh27eIBGlka9Rnfp5BDKjjEJkJTSwPn2sdR+tQWzsR RgMpZDR03ppf7LqXW6Gp3jcHPDeoFwyKYDndLtn5YoRIVVi/DLktVnuylcVKrL7roquw 2r4amZys1VawcMwCfG8odi6LJDwOpW2t1yBuCqmknoE2VpF4WRkQXUNSS5ZrGbDM4bvl ykYn44JHb8UfjYqKMPwxhZog4gZXjpEiUqemARG0ArfXHsgpj8skdcftSDNQZPj8iEu2 b5OQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=IdZYAg1C; 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 gy15si18297825ejb.752.2020.12.28.07.19.47; Mon, 28 Dec 2020 07:20:11 -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=IdZYAg1C; 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 S2437230AbgL1PRx (ORCPT + 99 others); Mon, 28 Dec 2020 10:17:53 -0500 Received: from mail.kernel.org ([198.145.29.99]:38030 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2437237AbgL1OD5 (ORCPT ); Mon, 28 Dec 2020 09:03:57 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id B4E69207B6; Mon, 28 Dec 2020 14:03:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609164197; bh=FhgL4NSFiftiIalFpRGQKVHGGB5E5Yh+LOmWqffFtCY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IdZYAg1Cpp8Vsc3fIs6Mux5fm96i1wm/eEZGnHTUGXZrxHJ3Dno0mTehQJlpwUnx0 z/MoqzQOjiqMWIRtZepyDd5UzR35h0BbDix3CPKZUOscSVQucsoQT5LbEQYGab6Ton KrJ92DtSx7YZHIbGL5cSyqCecUgmeSzCa2c0mceY= 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.10 095/717] ASoC: wm8998: Fix PM disable depth imbalance on error Date: Mon, 28 Dec 2020 13:41:33 +0100 Message-Id: <20201228125025.527830427@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@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 f6c5cc80c970b..5413254295b70 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