Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp3553998ybl; Mon, 12 Aug 2019 02:25:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqxdGIaFAGRQPt9W/oRcnmRIhHxzZVOGOYTRrAyktqWPLnlGGmaVFlMvPwJMwOaKUyGPEqJx X-Received: by 2002:a17:902:ba8e:: with SMTP id k14mr11164659pls.10.1565601915361; Mon, 12 Aug 2019 02:25:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565601915; cv=none; d=google.com; s=arc-20160816; b=c/TPy26DEMztRgNA+wJeJHrhArKFv0KNRbn7rrrun6qbTC/kiQrm8bRECLDsOnqxTl bZYiivcpzFXVjKifA/KldXllqgHCCvct+aTm08FSR4qbEqpLA2/05p6vwFNhNEWcs+rf PwdxqVAC9oqpr4Sp0tMVFCQQvKLfoB/DYTb9GwHbgFhsxhZ5JaPKRFsp9x2pN3dhPi8f gGkMKRjy78d+kGT+Gk69QfbrQs3ua2DpfTll8NnhQbmcWAFkgd+VqenzR5ZwKgDLWmwU 95YV2BiTwejeJi9cM3R1QWxvCOFOWTispCxPuuIRvZ9mT0EtaXXp4qs9+6il3Yo+fGzQ xK2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=mVcblQCNG/+sWQKT9shvueTk+7Ob6+A9LjiY8ZS4aTU=; b=FLHldZaf2htM8NFBErPkD4oNoPXeH/YlSv97rWj8VjzRs9jT+/HxwPML9wP634jqqK 7VIzcMsBnaZafmt7K1XVJZ4gmjr71mh2qY/nyD0nD+FTOgj1DuzGNy8SVcdLYyfqQLhr JBj4B9UI5/TQXIBlm4WRT6iZvip7CGxBRMehMPuhU07v/XtGpIYRr3SurAU2MXBizX6u 6mPNEPzyShFBJQDlpbIueVpeLrKggjwg3Yin70owEY8co8GqvFR+BEcAXBLtxNi2Ia2W DtS9+ttar7Opodm9DyKGJ5fB+TmF963Pb/aVrlXyCvoNYTQPmP7ZfWCrgwSMOicKGTrf ZLFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=GBNR6ARi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=opensource.cirrus.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o93si11354689pje.38.2019.08.12.02.25.00; Mon, 12 Aug 2019 02:25:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=GBNR6ARi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=opensource.cirrus.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727324AbfHLJYO (ORCPT + 99 others); Mon, 12 Aug 2019 05:24:14 -0400 Received: from mx0a-001ae601.pphosted.com ([67.231.149.25]:57632 "EHLO mx0b-001ae601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727072AbfHLJYO (ORCPT ); Mon, 12 Aug 2019 05:24:14 -0400 Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x7C98xjJ016681; Mon, 12 Aug 2019 04:24:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=PODMain02222019; bh=mVcblQCNG/+sWQKT9shvueTk+7Ob6+A9LjiY8ZS4aTU=; b=GBNR6ARidGgZ34igx2vMEGgU4YJS3AyU2ZP+fuk+FFjuucTz0lRfegNZC+nx470XJnUS 8/C4iFCtGKGOSpWo7Xz+JC2SqpJMOoXVUZW+v01P282WT8iZ7wSkK0MYUdTZCyg8FHCv IBLHlZZ69Tl7iiU7z7u65Muk5rgBw8UgrHgnL9gmgF9ZmfmtcGy9qhEYnQIiR3H+tVgI 0GJTxp+RxF6MDtIIHRj9lyahj6zmu49OiNccVAAuvcSCSiXKT1Oxwg6m4hlrBj5c/PWJ SJKW7T7yUlBGnjeSkSp5LjO+MoiY4sdFjG9vm/2opc1lSH2tDFAZBxPDC1Cj/HwUIbA5 2w== Authentication-Results: ppops.net; spf=fail smtp.mailfrom=ckeepax@opensource.cirrus.com Received: from ediex02.ad.cirrus.com ([87.246.76.36]) by mx0a-001ae601.pphosted.com with ESMTP id 2u9ub22hqr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Mon, 12 Aug 2019 04:24:12 -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.1591.10; Mon, 12 Aug 2019 10:24:10 +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.1591.10 via Frontend Transport; Mon, 12 Aug 2019 10:24:10 +0100 Received: from algalon.ad.cirrus.com (algalon.ad.cirrus.com [198.90.251.122]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 0ADBB7C; Mon, 12 Aug 2019 10:24:10 +0100 (BST) From: Charles Keepax To: CC: , , Subject: [PATCH] regmap-irq: Correct error paths in regmap_irq_thread for pm_runtime Date: Mon, 12 Aug 2019 10:24:09 +0100 Message-ID: <20190812092409.21593-1-ckeepax@opensource.cirrus.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-SPF-Result: fail X-Proofpoint-SPF-Record: v=spf1 include:spf-001ae601.pphosted.com include:spf.protection.outlook.com -all X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 lowpriorityscore=0 priorityscore=1501 impostorscore=0 malwarescore=0 suspectscore=1 adultscore=0 spamscore=0 mlxlogscore=863 mlxscore=0 bulkscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1906280000 definitions=main-1908120103 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Some error paths in regmap_irq_thread put the pm_runtime others do not, there is no reason to leave the pm_runtime enabled in some cases so update those paths to also put the pm_runtime. Signed-off-by: Charles Keepax --- drivers/base/regmap/regmap-irq.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/base/regmap/regmap-irq.c b/drivers/base/regmap/regmap-irq.c index c9dc70ceca5f1..3d64c9331a82a 100644 --- a/drivers/base/regmap/regmap-irq.c +++ b/drivers/base/regmap/regmap-irq.c @@ -370,7 +370,6 @@ static irqreturn_t regmap_irq_thread(int irq, void *d) if (ret < 0) { dev_err(map->dev, "IRQ thread failed to resume: %d\n", ret); - pm_runtime_put(map->dev); goto exit; } } @@ -425,8 +424,6 @@ static irqreturn_t regmap_irq_thread(int irq, void *d) dev_err(map->dev, "Failed to read IRQ status %d\n", ret); - if (chip->runtime_pm) - pm_runtime_put(map->dev); goto exit; } } @@ -478,8 +475,6 @@ static irqreturn_t regmap_irq_thread(int irq, void *d) dev_err(map->dev, "Failed to read IRQ status: %d\n", ret); - if (chip->runtime_pm) - pm_runtime_put(map->dev); goto exit; } } @@ -513,10 +508,10 @@ static irqreturn_t regmap_irq_thread(int irq, void *d) } } +exit: if (chip->runtime_pm) pm_runtime_put(map->dev); -exit: if (chip->handle_post_irq) chip->handle_post_irq(chip->irq_drv_data); -- 2.11.0