Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9439388pxu; Mon, 28 Dec 2020 16:35:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJxvxlGjJ2pUIuQPTxm3QnOg1k1bDTGp+Gdw9n8ScKEq2/4rxLFJx8W9O9+H9/EaHHnzlAxB X-Received: by 2002:a17:906:2707:: with SMTP id z7mr43965168ejc.418.1609202141149; Mon, 28 Dec 2020 16:35:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609202141; cv=none; d=google.com; s=arc-20160816; b=0YzjEzaUe3fN6UnLfRh2FeugEN3avYuV2SsIBVTyPtQmM7ImcU+n9rmAk22o866JFE WoIW4Lh0HpQiScxWEjVyTBDL+Vh1tmHrRLLRHVzjrlNN+n6at6dn3/YNKgE3oIkPFJBi GXp3Kk9OWd6yHpbEYSKCyA1hd+FstVbdxUSMtisA3SWN6P8if+IsXHJdhpAJKSiBHG4M 9l+rjcN01K1wO82DGEnhuKwOotyrwGEl1MVrp9xsrOPRbrHgT0ot4mnczel61DX8m5m0 GgYEK1AO8hdcKWmIzOCwlKwCxYkdyfpTDe6/5eVokf9LijCw+b1fIMqDeyup15wwN4dQ nX1A== 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=kGQf1G6uLJ/301iWEVUs/HpHStWgLQOeQ5cDy6PoaAw=; b=aKo0e1JhDgK49hSW22Glq1FJcMJHd5ra4yPVT/qhWQQ90N6W08oy2wQA9Nk8Q02TUC Ym+5tmOHJ2Rc+UbtdzwuxaGdB+cHDm729pMv6reA+IaPpEivmBAW/F2VtPUIDHmDDvUn 60eByyr5TQuQxUKACJ6v74KDbrFuhL4X6e71LIMnbsLZB1WdLRs7S/W8l14wNndZz4No gJJvyV9DK1YAvZFop/OwIDILvUgtP30eKNpoL9i1Qq9FPSJ4Jfe8jN8Bkzb98hAtNedD EdiIpy7t8lyrK2AaWBVrWmh1XYptSUyu6HqB9574DW8xHhIFSrrkDIBTy+N0bBlvy4rU 64ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=QBu3EcTo; 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 g9si24672411edn.361.2020.12.28.16.35.19; Mon, 28 Dec 2020 16:35:41 -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=QBu3EcTo; 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 S2391624AbgL1Pow (ORCPT + 99 others); Mon, 28 Dec 2020 10:44:52 -0500 Received: from mail.kernel.org ([198.145.29.99]:45566 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404710AbgL1Noz (ORCPT ); Mon, 28 Dec 2020 08:44:55 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2D7B922A84; Mon, 28 Dec 2020 13:44:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609163054; bh=GK4D9Zt3HYoy7+nr9I5SdxhzyTWVZp4VXuz7JlcY7Ig=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QBu3EcToP3E0Zr3d7sIUVoaKn32r3dA/s7OctlVjpmeu/4ZV+3BQJBsI5/5nokyrl Y4Eqv4hgGw+ZyeMJMwgIA0Exw3BceR0CTXCK1tF2w32nUF4rzgJ44OmnCzoS+ia1yO 3iXPEYbfshAgqKIlWPqwFiOZHQZDETVkDtMdxrbI= 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.4 154/453] soc: ti: knav_qmss: fix reference leak in knav_queue_probe Date: Mon, 28 Dec 2020 13:46:30 +0100 Message-Id: <20201228124944.615913975@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124937.240114599@linuxfoundation.org> References: <20201228124937.240114599@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 1ccc9064e1eb5..dbbf15e7ef6e1 100644 --- a/drivers/soc/ti/knav_qmss_queue.c +++ b/drivers/soc/ti/knav_qmss_queue.c @@ -1791,6 +1791,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