Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp2032248ybg; Fri, 5 Jun 2020 03:58:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxxCJaTZzF8PIIABOpkXh6GGAeLKCNFJVC0nBOJhXxPni0DByTs3RjW6iamLIxER2uknQhA X-Received: by 2002:a17:906:15d8:: with SMTP id l24mr8028345ejd.479.1591354720361; Fri, 05 Jun 2020 03:58:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591354720; cv=none; d=google.com; s=arc-20160816; b=GSXMTVMeDNUTKyhDHkKzaAw1h677mj5OzZFAdJzfEv7GmSibWNJsoQd3PIYbdd4Yno q/qHd89DqgTglaVdPqWlC/yEeTTsDGSUDG7pNkHKGfMZUAqBpLQ+jXKfVgSX3vE5yIc8 P2XcKu8tf/B7w5DHBnPmPUZhl4LiZsqthSh3CxVsFsYidMG8WzBa3XB1snEfT8NFybC/ ej9FIy6H6WwD9JyMrfk2mXrd2PNpDZNQMyGWHW0OMQ4Vjy9Wg1RQK/NHh5KripGCcgbW gkGCqohMfJZgXnAMmyfJG+ZlYhQYrLGkJ4Ivjp0B6dipuALuGtwQWQVy1qcAA/R7P9kW waow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ZbK/dK9wn61bfyY9xfvYC0ECFbysMwQiCJ1MjYEbWRo=; b=tk7LOUtL1PrxD6cANKNa8d3o/0+GZmLg2HNfhlaIawjej+Dp8+O7/CQAglHeKiT0tl 4RJxdtVJMvbSm3k2ttnTn09NYRtkTJSbtTGn+m8w3sBbzkOxxjZmovR5GoP71NIi+oTQ 8yYQkuKNJNI8WlhdkoPjbYmQF3jnPuqevYo19v7jYPbXgT1+6tzDQwxx/we/ybddsEH6 zVOO4BO0CyZZOEmKBrHqzRjmKcTxOrQmwogH+rYl6eFyvLbmkt2pAtXw5tzn2M7dRp+e A9wvUImTNyyf5t2U/KnphKO3KtIq8Wb28joS16yyeJ9t/UMUSjw5FoHT1kQr8CUUZ6rF 9uvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=eJuHAZq6; 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 d15si3390769edp.112.2020.06.05.03.58.18; Fri, 05 Jun 2020 03:58:40 -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=eJuHAZq6; 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 S1726912AbgFEK4Q (ORCPT + 99 others); Fri, 5 Jun 2020 06:56:16 -0400 Received: from mx0b-001ae601.pphosted.com ([67.231.152.168]:1782 "EHLO mx0b-001ae601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726529AbgFEK4Q (ORCPT ); Fri, 5 Jun 2020 06:56:16 -0400 Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 055Apu1N022876; Fri, 5 Jun 2020 05:56:10 -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=ZbK/dK9wn61bfyY9xfvYC0ECFbysMwQiCJ1MjYEbWRo=; b=eJuHAZq6Az5uPaKSZC/bnCUcaLPRunIWkWfw1Ni4s4Bmpjwa4Mn2wgGcV+FCyXrVHFpk sS7Yl1vM9r+6Jy4NCPEN0A9o3vE5p2zLyCD67ySz91TVAxmlDenOCzbuRyMUDepBbp5Y ycdyZZsIgBclSvjPpftcXowoseHQeDObR06aOCI25XPPeyfcwFFGsQaxXHSH4Tq2qpG9 KP7Z+2Yogp+f3piXCYfgPv2si59khxJgVSzwR+V1VNDsSX8CspaFX71YutRF+KtrGEta XFMfM1ELwHAyi0jDsxY4Qni0H6dq47CJKG+kKbYB90Z16fahRu37LZIp1ovbzvI+tDbQ EQ== Authentication-Results: ppops.net; spf=fail smtp.mailfrom=ckeepax@opensource.cirrus.com Received: from ediex02.ad.cirrus.com ([87.246.76.36]) by mx0b-001ae601.pphosted.com with ESMTP id 31f918s2vr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Fri, 05 Jun 2020 05:56:10 -0500 Received: from EDIEX01.ad.cirrus.com (198.61.84.80) by EDIEX02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1913.5; Fri, 5 Jun 2020 11:56:08 +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.1913.5 via Frontend Transport; Fri, 5 Jun 2020 11:56:08 +0100 Received: from ediswmail.ad.cirrus.com (ediswmail.ad.cirrus.com [198.61.86.93]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id D48042C5; Fri, 5 Jun 2020 10:56:08 +0000 (UTC) Date: Fri, 5 Jun 2020 10:56:08 +0000 From: Charles Keepax To: Navid Emamdoost CC: Linus Walleij , Bartosz Golaszewski , , , , , , , Subject: Re: [PATCH] gpio: arizona: put pm_runtime in case of failure Message-ID: <20200605105608.GN71940@ediswmail.ad.cirrus.com> References: <20200605030052.78235-1-navid.emamdoost@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20200605030052.78235-1-navid.emamdoost@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Proofpoint-SPF-Result: fail X-Proofpoint-SPF-Record: v=spf1 include:spf-001ae601.pphosted.com include:spf.protection.outlook.com ip4:5.172.152.52 -all X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 mlxscore=0 cotscore=-2147483648 lowpriorityscore=0 priorityscore=1501 adultscore=0 mlxlogscore=940 suspectscore=0 spamscore=0 malwarescore=0 clxscore=1015 bulkscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006050084 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 04, 2020 at 10:00:52PM -0500, Navid Emamdoost wrote: > Calling pm_runtime_get_sync increments the counter even in case of > failure, causing incorrect ref count if pm_runtime_put is not called in > error handling paths. Call pm_runtime_put if pm_runtime_get_sync fails. > > Signed-off-by: Navid Emamdoost > --- Acked-by: Charles Keepax Thanks, Charles