Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp865889pxf; Wed, 7 Apr 2021 13:39:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwq1a9giMvXYrhgb7WMqwMz4G/bESmVvNT+NMSd346gLqtONnD9oAV0BCV79SEJW5opS6ej X-Received: by 2002:a50:fb8c:: with SMTP id e12mr6920829edq.295.1617827953945; Wed, 07 Apr 2021 13:39:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617827953; cv=none; d=google.com; s=arc-20160816; b=fRxS1XjSQClq/ztEWGrHjHJj+GJWknDeFvYCZhKukO6CzblyhuYqoCjl90veOXSO3Y i+hXznaCj7PBliNyXzh4ECIxEs6RcQfpiMkn3CcmQvEtfWUL9C2alu7dsj9bkWsj3CiJ xkEzwBHBLVfWkdrlLvWb3/tVfxeLGOyjZ5vSj1FKb/at6XzPm+1oOihNUKl52JgXjCwB lPcoN3VX0oNky4MDN6G1CEhe+/JL6oSQXFoPUIQzVzR7//ly8edsJQlOZvyCj0cv4Qlk NxGZfdqSkEkVQBmFwIBfAylAHnS4f0bqCoDwDQgxyGfzoN6LSsit9eAKnPcuMyFTdf+c 4Hxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=MYjQxKqbd3eBBgmsM9QUSNcq2htdoJkr2o++yxL5dB4=; b=fGnqFUEeWDcfd1HmPJvV3a88lBNmIHmrsa2l2LPl+ELZv51auZFrK2u+hNNkHfZaxq HHpcuqwuqAUdloOCEjjRO0gRcnAA9rCaTLJ39yS3Itq5mdgDS18rhCLqpXgHaGzltZw9 Jcyr8C/SH6XGSyUhzaaFaPc008CxjrlbwcvVxdgvtVTRzCg86RB72M73yDAch7g5FFcv EOVQEQ2CzdsSvbCwQkaBbg+Ab0MleUKr3d2nysFpdyGdwYtUzwQlNhRFHNcDBSubRTD/ nis1c0rnoDul5aPEz868uPXiqNvRgSN2IUUVE+cQLiL+KlbJ53NWKXX4muis9q179Se8 dqzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=Ayv9cLgq; 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=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t18si19491347ejj.437.2021.04.07.13.38.49; Wed, 07 Apr 2021 13:39:13 -0700 (PDT) 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=@cirrus.com header.s=PODMain02222019 header.b=Ayv9cLgq; 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=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349787AbhDGI7t (ORCPT + 99 others); Wed, 7 Apr 2021 04:59:49 -0400 Received: from mx0a-001ae601.pphosted.com ([67.231.149.25]:16140 "EHLO mx0b-001ae601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1349782AbhDGI7s (ORCPT ); Wed, 7 Apr 2021 04:59:48 -0400 Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 1378lTeo007605; Wed, 7 Apr 2021 03:49:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=PODMain02222019; bh=MYjQxKqbd3eBBgmsM9QUSNcq2htdoJkr2o++yxL5dB4=; b=Ayv9cLgqSJvQaugsepvhhtXN0KLDooVrrlLH65SejsnEeFjK8xwWrLAoMeB/Nscdn+6I S9mFZ1qJn21U4ZCRvOp5WbOei0HPLHSoasV5FLkO9EjhumIoxxKWk+TWdeigfI5CjBMZ OUwoGPAFXOXnSBNJUiPKgpyhn+/ibt23HjW+UOViYNsGIp9EpsDf1O9SyG55qy6OHJGM ZseOeJjX7M3jaW7zH4Pb3kbyMex5kB39o45sFJMIOhEWNal0HQyQkl2txhFHGexNBoD0 xxjrTICmv6pAZJUhIOAKiKLzxfHWbqlfuiJTk9o8bnXXuz6CywwBEOqUMVPtsaKfSuvw Xw== Received: from ediex01.ad.cirrus.com ([87.246.76.36]) by mx0a-001ae601.pphosted.com with ESMTP id 37rvc397m6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Wed, 07 Apr 2021 03:49:53 -0500 Received: from EDIEX01.ad.cirrus.com (198.61.84.80) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Wed, 7 Apr 2021 09:49:51 +0100 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.1.2176.2 via Frontend Transport; Wed, 7 Apr 2021 09:49:51 +0100 Received: from ediswmail.ad.cirrus.com (ediswmail.ad.cirrus.com [198.61.86.93]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id E608211CF; Wed, 7 Apr 2021 08:49:50 +0000 (UTC) Date: Wed, 7 Apr 2021 08:49:50 +0000 From: Charles Keepax To: Dinghao Liu CC: , Lee Jones , , Subject: Re: [PATCH] mfd: arizona: Fix rumtime PM imbalance on error Message-ID: <20210407084950.GU106851@ediswmail.ad.cirrus.com> References: <20210407051149.31422-1-dinghao.liu@zju.edu.cn> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20210407051149.31422-1-dinghao.liu@zju.edu.cn> User-Agent: Mutt/1.5.21 (2010-09-15) X-Proofpoint-GUID: _q2tjFOE23xLZj9UlZRC5npnnZ52mu67 X-Proofpoint-ORIG-GUID: _q2tjFOE23xLZj9UlZRC5npnnZ52mu67 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 mlxlogscore=999 bulkscore=0 suspectscore=0 mlxscore=0 adultscore=0 impostorscore=0 clxscore=1011 lowpriorityscore=0 priorityscore=1501 spamscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104060000 definitions=main-2104070064 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 07, 2021 at 01:11:49PM +0800, Dinghao Liu wrote: > pm_runtime_get_sync() will increase the rumtime PM counter > even it returns an error. Thus a pairing decrement is needed > to prevent refcount leak. Fix this by replacing this API with > pm_runtime_resume_and_get(), which will not change the runtime > PM counter on error. > > Signed-off-by: Dinghao Liu > --- Acked-by: Charles Keepax Wow, did not realise that was how that worked. Thanks for fixing up. Thanks, Charles