From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B2F28746A for ; Thu, 12 Jan 2023 13:59:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EF8E6C433EF; Thu, 12 Jan 2023 13:59:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1673531988; bh=ytt6bdXZld1xMtZ+hDVq8E1/J1C1UTneJ/0sLZzkbcw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EYCG/AS4manrK3Us6Xaqu2/HEqOnbDswKwoaCSt0zjYkXnY+fV46CQghTDuspgc/2 sDFyWvGS1yti01ilhB/nyFdiorJ34kPnhPcQdwbU87+KEQ15STz/5uvrBvzUbk/6fN r1XFaheM5ApwZSvyyL9qPRcCiovyB6rvQyAJoCeU= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Zhang Qilong , Nishanth Menon , Sasha Levin Subject: [PATCH 5.10 017/783] soc: ti: knav_qmss_queue: Fix PM disable depth imbalance in knav_queue_probe Date: Thu, 12 Jan 2023 14:45:33 +0100 Message-Id: <20230112135524.968370667@linuxfoundation.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230112135524.143670746@linuxfoundation.org> References: <20230112135524.143670746@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Zhang Qilong [ Upstream commit e961c0f19450fd4a26bd043dd2979990bf12caf6 ] 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: 41f93af900a2 ("soc: ti: add Keystone Navigator QMSS driver") Signed-off-by: Zhang Qilong Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20221108080322.52268-2-zhangqilong3@huawei.com Signed-off-by: Sasha Levin --- drivers/soc/ti/knav_qmss_queue.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/soc/ti/knav_qmss_queue.c b/drivers/soc/ti/knav_qmss_queue.c index 38e2630eec36..20c84741639e 100644 --- a/drivers/soc/ti/knav_qmss_queue.c +++ b/drivers/soc/ti/knav_qmss_queue.c @@ -1784,6 +1784,7 @@ static int knav_queue_probe(struct platform_device *pdev) pm_runtime_enable(&pdev->dev); ret = pm_runtime_resume_and_get(&pdev->dev); if (ret < 0) { + pm_runtime_disable(&pdev->dev); dev_err(dev, "Failed to enable QMSS\n"); return ret; } -- 2.35.1