From patchwork Wed Oct 19 08:28:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 4698 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp213747wrs; Wed, 19 Oct 2022 02:10:59 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5luYXEgaOZ+3HZ5jvYPnTyHiQ6Hh9vWpnVPNb6P6dWd7V0N1tnO+giGT82tR8bPkOTmYB1 X-Received: by 2002:a17:907:16a7:b0:78d:f5d4:a74e with SMTP id hc39-20020a17090716a700b0078df5d4a74emr5886892ejc.9.1666170659570; Wed, 19 Oct 2022 02:10:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666170659; cv=none; d=google.com; s=arc-20160816; b=QkJWo2/iERz6HNGj2z3Rhxs5fP8TtV6luvGxeBI4lS8w/XqzTQ8kEIVLWOd2h88A1A +T4vzwZrl0n0soh6VHVS0Io1dZijsg/Zojlo7wzJc8o0KViAy3mqQuoqkdF+tybs/Aya tWoWMB4OQWXEtLTIjLRmT9sSTjhLd6htYGBoDilEJ4M25yj2EcuB4kM6zOwUTvyB9pcD +UZ9okCMfN+F5CFyKnfmnCF9BCmIiPbon4I4nckbJU6DAoGk5MhdeWGS3tChLbWxZKOB DRWeMlBgiiq360A8avnRq3W/8rzwq+c2L+oXhsjW2IgfqLLstwRyZXxe0vew/WI9/+rU DdBQ== 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=Sm2iJfXdhF//l5M5YvQrQ/xmTrFfVkZIKoWgDb4byGM=; b=njQkNQXF0CJ1fYpAm8aF8KH727zEjRqAyb/BRNb3vyA4sOmyIuTaclZz6mqP1yTrye vdRCjn4PuwSoghc+IF2iPkmIpcgqSdOcimDKOMws0a63B9d2K4PU4X3ktkpplkrTMrMx dW+e5lqWAb6MGuYueyf9qPK+3x9nY2cP+9AREoxR52B7CC1Co06mjmm3mmQPLUgTPPWT 5ex8T+MtwES3cY+Qu1MSqoXoTD/3nbCnOetA+AKcbpdF5k4jGYcMf+fUOSjEqmGBizdo /pVL91KAwEEnffSH0USXbXK4rklC3J+qyphaQodFBEgVIzf5tx28Q6ksG+E96iuKhEa+ +NCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=FJTgDp1k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c37-20020a509fa8000000b00459fd8d90d0si13042515edf.244.2022.10.19.02.10.33; Wed, 19 Oct 2022 02:10:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=FJTgDp1k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S232406AbiJSJGQ (ORCPT + 99 others); Wed, 19 Oct 2022 05:06:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33982 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232515AbiJSJE2 (ORCPT ); Wed, 19 Oct 2022 05:04:28 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7CC1FAF1A6; Wed, 19 Oct 2022 01:57:54 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3E91061802; Wed, 19 Oct 2022 08:56:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4C4C3C433D6; Wed, 19 Oct 2022 08:56:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666169784; bh=tCpDlL40jrwntMcVjsOyaiSsrTNTevG/xosowBF2D0Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FJTgDp1kHoUl9MP8hF5ivh6SlaSfJjgD/iE/CUNTJhcqiVzlm0cpZurc62Pd+qX4M 0Z/mVXc3VVy1nuhqXlJ26+uz86MBJU+xVhXfa/RydNnskPRyQWWTAb41cCFAbOZowf KL1IMb5zveihAdBsnP6UIUpoly8nqqtripu3/9OQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Zhang Qilong , Olivier Moysan , Mark Brown , Sasha Levin Subject: [PATCH 6.0 406/862] ASoC: stm32: spdifrx: Fix PM disable depth imbalance in stm32_spdifrx_probe Date: Wed, 19 Oct 2022 10:28:13 +0200 Message-Id: <20221019083307.893761182@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747106565671606469?= X-GMAIL-MSGID: =?utf-8?q?1747106565671606469?= From: Zhang Qilong [ Upstream commit 0325cc0ac7980e1c7b744aab8df59afab6daeb43 ] 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. We fix it by moving pm_runtime_enable to the endding of stm32_spdifrx_probe. Fixes:ac5e3efd55868 ("ASoC: stm32: spdifrx: add pm_runtime support") Signed-off-by: Zhang Qilong Reviewed-by: Olivier Moysan Link: https://lore.kernel.org/r/20220927142601.64266-3-zhangqilong3@huawei.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/stm/stm32_spdifrx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/stm/stm32_spdifrx.c b/sound/soc/stm/stm32_spdifrx.c index 0f7146756717..d399c906bb92 100644 --- a/sound/soc/stm/stm32_spdifrx.c +++ b/sound/soc/stm/stm32_spdifrx.c @@ -1002,8 +1002,6 @@ static int stm32_spdifrx_probe(struct platform_device *pdev) udelay(2); reset_control_deassert(rst); - pm_runtime_enable(&pdev->dev); - pcm_config = &stm32_spdifrx_pcm_config; ret = snd_dmaengine_pcm_register(&pdev->dev, pcm_config, 0); if (ret) @@ -1036,6 +1034,8 @@ static int stm32_spdifrx_probe(struct platform_device *pdev) FIELD_GET(SPDIFRX_VERR_MIN_MASK, ver)); } + pm_runtime_enable(&pdev->dev); + return ret; error: