Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9081770pxu; Mon, 28 Dec 2020 06:11:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJzJV9DI2AZiGtox84jva3YnUNuXGlueyBMwDrn3ntz4cjktnPEL/Adt8NT4reBGAZ/1jZwZ X-Received: by 2002:aa7:c3cd:: with SMTP id l13mr41970851edr.97.1609164717116; Mon, 28 Dec 2020 06:11:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609164717; cv=none; d=google.com; s=arc-20160816; b=nBzm9+/H8XVd8FmCp5DKqi+F3Y3dAm3/vDiYTHeX2R8YV2mHc988xIZSfme6/b2evg nejE577lJL3XnugBoOraaHQlGqNTputs17T2C83R6mfkI8Htf98PE1MM3ZSucn75G3n/ PdXxnXAm+3s59Ob8afm+04ukt+jDijg21rrYsWR7RJFhkS/XsGkR6RBgQpNjhyj11JVe g0oQ07VXrXe/YyAO2Dlyr4PULsePIwG353dTu02YCNW11Gb0+JIljt/0xRHLs3ZofCgX 9B1Qr3szEP3z9N/iW7JB3JNU2jsM+qhEyyrJKzpLKVll/6dh5jgcHpY+ojqnaPVGmcKL lmeQ== 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=vNI8QOJ1BW7QGvXbmzjUlj2NoRWzvnXPCy6QCtJRZuY=; b=GBvao4UwClFy2eLQlHgKoH97uEJTcIv7qPvSazNxLEhCvLFx5MdAaR4rswXqLTKU0f DjxT6XGGsnuHYtFw/n/bmpG6z0tNaUWkinzJ44eMMCJqVhir0z36XGPky3yqw1vQM9SK POZB9kxyoiLXCqH/qB+6xqDPJ6GTkxSusqsQ9Hu/PDdSoDI+pTm90nqYb6WQnQelwlm6 QQb+ZUmZXlTOnoR+cgvdBKsspxCLPWt4OnGo0o26mG/uv4UNj2rCp3Y0jy6LAd0/92dW s9gQ5HsXAVhTx37nkfEjDrnPF0ARLvFKIHRxdk64TZXZW+sukIA0K0ZyahREQsJMEn5v MtEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=HIb0hd5o; 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 x17si22586549edq.181.2020.12.28.06.11.34; Mon, 28 Dec 2020 06:11:57 -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=HIb0hd5o; 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 S2438799AbgL1OJ1 (ORCPT + 99 others); Mon, 28 Dec 2020 09:09:27 -0500 Received: from mail.kernel.org ([198.145.29.99]:43808 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2438680AbgL1OJZ (ORCPT ); Mon, 28 Dec 2020 09:09:25 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1CF312063A; Mon, 28 Dec 2020 14:08:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609164524; bh=f+OKUiKmo0iefOodjHBay4uqh+6Y7GvIpqFAfxL6XTY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HIb0hd5odBhau9zNjDh8B9krJ8j52nMUraAMBgL0eNDjTbBsTTnX1HJD5IWmw/JfK ASnqs/4YcisiwpsnidtKc1dD2VDOjY7wwKSuMJdQtWvTvF66mgAB0IGMYQ1dZXdndl gsrg+JK7aC7YcfnnNUi8r6vqO4Oy1Lm0AMxIVKLA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Zhang Qilong , Santosh Shilimkar , Sasha Levin Subject: [PATCH 5.10 178/717] soc: ti: knav_qmss: fix reference leak in knav_queue_probe Date: Mon, 28 Dec 2020 13:42:56 +0100 Message-Id: <20201228125029.493527050@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 ec8684847d8062496c4619bc3fcff31c19d56847 ] pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to pm_runtime_put_noidle will result in reference leak in knav_queue_probe, so we should fix it. Fixes: 41f93af900a20 ("soc: ti: add Keystone Navigator QMSS driver") Signed-off-by: Zhang Qilong Signed-off-by: Santosh Shilimkar 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 a460f201bf8e7..54afa8f7f4087 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_get_sync(&pdev->dev); if (ret < 0) { + pm_runtime_put_noidle(&pdev->dev); dev_err(dev, "Failed to enable QMSS\n"); return ret; } -- 2.27.0