Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp12309230pxu; Fri, 1 Jan 2021 16:46:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJzzBP0fKR9xMevXgjRQym1C9cwu64sDsh5Bhs6TZGqyYOABRXrXH7ZfwRxwuptgdvtl6ny3 X-Received: by 2002:a50:d4d9:: with SMTP id e25mr61881834edj.243.1609548400304; Fri, 01 Jan 2021 16:46:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609548400; cv=none; d=google.com; s=arc-20160816; b=Fzj3nGlsmbpmbmhfS4kfUhc8c1CMEtPSQ1Yv3l0oU9tBAE0PQWzngIIlc4r3PcVM04 GwBMKZbKRUFdAOndh0YXpkkEu0kyy26L+fQ1BndP8/nnvQpxVSUuPdVLVLj0blL//eGg eCuruoO5LCRZjfd3ybWVA74ERX3tUDeHI0eGWxjcNg51zuKe264Tx7y8FHSWVJeW9MFS XZmwXwJoptv05HUBdU9qop6vzgYcPuxNAs5Q05pjabIiRTy/l/8ofo1Iy/BzVxYMFfXe q5qihvyGiIqDs46Uqmxr2qlDVQvB3ktjCpOeKdiqTGpDxfK0uKfaowWQom1hUmi1Kite xC9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=gRLjcfc2hdq3yf6Ztg1Cq205qvoFQtTekG1N4yy04Yw=; b=xDIW0+NvyLa8bUL/exRb/w/THp3pqX4aWnnuRR3amORu3UhNCyAbRSy+NPSDVICiNm VYWCC+s8NEvhc7hpBE2bKUf4muVQtc9Y68FUvQbfXoGpTIDptnbQSr8ncnRt36lMwCji euO4IvAsSLh0PGhlqueuDC6g9o+ShjyEJLcBUKnbrAh/XFxhyTKHQRJcJvcSkG4HW6+i yKNSS8ryLlojq94o2u0zhLZjg1tXlRxvByCqQwF1GlJVhTEGu8M8zN91zd/5uClcAc5z QbXkSwcNf4QTH06JzHlbukPfz20i+MDC7JQWvidu78esEf+dPE0JOfM3BNSGe0jK2V8L pLSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="HjZ/qOwT"; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a17si28089654edb.389.2021.01.01.16.46.17; Fri, 01 Jan 2021 16:46:40 -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=@kernel.org header.s=k20201202 header.b="HjZ/qOwT"; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727309AbhABAog (ORCPT + 99 others); Fri, 1 Jan 2021 19:44:36 -0500 Received: from mail.kernel.org ([198.145.29.99]:46908 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727213AbhABAof (ORCPT ); Fri, 1 Jan 2021 19:44:35 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id B3BC62151B; Sat, 2 Jan 2021 00:43:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1609548234; bh=owlaR9KANyawFUUa98YH8smNm8K7oBTLr4GIwtXfXOs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=HjZ/qOwTJ5NVHOd0CEVuqmhrOQiBae7grNfqG6sejyUYnK/D4/ymoBXGN2QPKxr/2 BZ+1xKGi3dVIi2NwYLoA+YWxnny3/txqjJFZAM2aHRLxRfaM3Md93NCMB87dE5XmRm 0BnhXe+0ufHdY+LKrFegNXyJY/6FOTaDdn3QnKQdVijoCkRFhhK72i28mrz1FAS92f hmghSN7vo3UqUK/28IXe/bQvRuol5ext6p5WHwVrzjCt9S/6ef0vcm24o75brKmCLP /QzY7w/kRyC7EGb36FfLeKw/GGQw3uhnlh7HCF3JZoipjc57fuRds+quu6o5IZ7p1I Fxpz69ndinMuQ== Received: by earth.universe (Postfix, from userid 1000) id 8ABA73C0C94; Sat, 2 Jan 2021 01:43:52 +0100 (CET) Date: Sat, 2 Jan 2021 01:43:52 +0100 From: Sebastian Reichel To: Zhang Qilong Cc: gustavoars@kernel.org, carlos.chinea@nokia.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] HSI: Fix PM usage counter unbalance in ssi_hw_init Message-ID: <20210102004352.z5yh3i25bftnx7ap@earth.universe> References: <20201123101827.3863792-1-zhangqilong3@huawei.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="gtdvmmddep46fz4i" Content-Disposition: inline In-Reply-To: <20201123101827.3863792-1-zhangqilong3@huawei.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --gtdvmmddep46fz4i Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Mon, Nov 23, 2020 at 06:18:27PM +0800, Zhang Qilong wrote: > pm_runtime_get_sync will increment pm usage counter > even it failed. Forgetting to putting operation will > result in reference leak here. We fix it by replacing > it with pm_runtime_resume_and_get to keep usage counter > balanced. >=20 > Fixes: b209e047bc743 ("HSI: Introduce OMAP SSI driver") > Signed-off-by: Zhang Qilong > --- Thanks, queued. -- Sebastian > drivers/hsi/controllers/omap_ssi_core.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/drivers/hsi/controllers/omap_ssi_core.c b/drivers/hsi/contro= llers/omap_ssi_core.c > index fa69b94debd9..b4ac2f8cb9f9 100644 > --- a/drivers/hsi/controllers/omap_ssi_core.c > +++ b/drivers/hsi/controllers/omap_ssi_core.c > @@ -424,7 +424,7 @@ static int ssi_hw_init(struct hsi_controller *ssi) > struct omap_ssi_controller *omap_ssi =3D hsi_controller_drvdata(ssi); > int err; > =20 > - err =3D pm_runtime_get_sync(ssi->device.parent); > + err =3D pm_runtime_resume_and_get(ssi->device.parent); > if (err < 0) { > dev_err(&ssi->device, "runtime PM failed %d\n", err); > return err; > --=20 > 2.25.4 >=20 --gtdvmmddep46fz4i Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE72YNB0Y/i3JqeVQT2O7X88g7+poFAl/vwcEACgkQ2O7X88g7 +poLcA/+MyQSUe8vFe0A+uOc8Ia/hrDDWoFI7GzKQ1+F0Mj02Hy4uPHH/MCVqDd9 ql9iiRlwBUknCVRdBz74uVHfs9a0J/ZTtJwVeCmBzM9PhyV2cDo7yQCKFR3w7d+T 3Fl6rxwKa8TVyTrSXK7ixyMmrKOFo3KiAoUyawrF1O7Bb529Kfueo3cHbL6iuDFg D1aAYDFndlHFGY4THQE9xUaOqL0K7h20MhrLsxbv3TAkNmb2pawe2eKWgtRM+xdc I9zcXGPvRh/h8AlwltetGWMA2oMdF9RYhC6ISzcVWCdZvAr+os2n+6EB7/hGunSd cRZAfierpf06nk1KCE1m4pvczRLZY6cdX0OHEXTt4dXMypv2J2L2cAklX3X7WeIr uELJIYs+frN2BNPhDpCynhJtvZpQPoAroVz+f46kHYeH21y+PzntEigETu6sBsxp +zhb0ABXQ9qXshkeTfm1sojpB5xXlAZcYUdmMBG4srTaJZtUtV1N3l8tKISaVpLR uwxpr0BSXENbSuj+Xpea7rxgFqGXWWvOGk8WIJh4ApOueyw1pnTYiPiQT6vHQL6G dD3EdvY9lKvjKDmTTfUAoIrk7MLKyMtuJZlBcf12+lNX2Rz1ZMAl6LlRYjooMss7 56xtx6kepm+W6+HQDqC1vhqDRTn5Qt0Zf6S1FRZR4N2Hyc8OlaI= =JT1L -----END PGP SIGNATURE----- --gtdvmmddep46fz4i--