Received: by 2002:a25:1104:0:0:0:0:0 with SMTP id 4csp181473ybr; Fri, 22 May 2020 04:10:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyl3APoOFjqSSgCgJ5k4bHEiE7Dm3YPgEDDP7fg4gS0ZfDqwmsTCdaPqYk60DrUMWxJu74j X-Received: by 2002:a17:906:6a18:: with SMTP id o24mr7607296ejr.66.1590145817584; Fri, 22 May 2020 04:10:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590145817; cv=none; d=google.com; s=arc-20160816; b=aI4twzojvfMqwoGm3+NB49Ji7RXWYeqZq4rhlHUno2/vIJXBawYf7w+rWo+wnDOggU PWSCYZF8tWZuNJ+UyzUSUEBRN/7zdm26N/UCkBUn/Le+zzQyKxYPdRHyLwpEYz40vuH+ k6cbv9Kavy+DWS4WhTcgt5Y94UrHmMpwZbYod4h9uNTtnFDdXTB7v+s08mnIHuw2knwo zXitfJWze/e/cLk2FeUFwJTc6W0HdEIrYyfTqBfxVNSBbSEpZ5FoEEbBpDz7cgrJq0Qz hKdo0hv0VCgEptAksO+mG9+AwvAxNH0gj9rsX3alJJ214KE+DpcyBtKsUqnjhzZ5kP77 +DyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=rHyLQwlKMNISVwIt43kHiW0uyfvRfZz0jheA5Qn+zLo=; b=Znm8il39K0pN26XPqYpstj9Rmsq8MzsJ5JIlXNQVRMcNJfYT6Q26drBoJMUu338aB5 /COoUvv3TuQqebviB4VpclhXhJijJI4FC8MvlQOOsCYVmAeUbJr4HRR5ALa7b0FSVEvE 46aX+HSABSRBGvj+gR09Si7rDYITlQj4STK9yRwmxVyem0oA6s1B3VxNtTsIwisVs0YN p7odbES61IrSPvhqIcVgdhYsKRKbpZ2C11pKE3kDzHWZ87KEYZs4l96drsrQ1Yifjct5 6Emd5w9/wj0HmCoRpqfbLJyrcppkJVVSW2RcOMTJRnci9jEZkV10XiEr7LXAVJquHypX bVzA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lu16si4917210ejb.600.2020.05.22.04.09.53; Fri, 22 May 2020 04:10:17 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728881AbgEVLHq (ORCPT + 99 others); Fri, 22 May 2020 07:07:46 -0400 Received: from spam.zju.edu.cn ([61.164.42.155]:63376 "EHLO zju.edu.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728281AbgEVLHp (ORCPT ); Fri, 22 May 2020 07:07:45 -0400 Received: from localhost.localdomain (unknown [222.205.77.158]) by mail-app2 (Coremail) with SMTP id by_KCgCHLzh0ssdetmytAQ--.15534S4; Fri, 22 May 2020 19:07:36 +0800 (CST) From: Dinghao Liu To: dinghao.liu@zju.edu.cn, kjlu@umn.edu Cc: MyungJoo Ham , Chanwoo Choi , patches@opensource.cirrus.com, linux-kernel@vger.kernel.org Subject: [PATCH] extcon: arizona: Fix runtime PM imbalance on error Date: Fri, 22 May 2020 19:07:31 +0800 Message-Id: <20200522110732.874-1-dinghao.liu@zju.edu.cn> X-Mailer: git-send-email 2.17.1 X-CM-TRANSID: by_KCgCHLzh0ssdetmytAQ--.15534S4 X-Coremail-Antispam: 1UD129KBjvdXoW7Jr18ZFyfAw4UGFyDtF1fWFg_yoWfJFX_Cw 45urZ3ur4fKryxtwsFv39Iv3yS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List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When arizona_request_irq() returns an error code, a pairing runtime PM usage counter decrement is needed to keep the counter balanced. For error paths after this function, things are the same. Signed-off-by: Dinghao Liu --- drivers/extcon/extcon-arizona.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c index 7401733db08b..470bbc8e5089 100644 --- a/drivers/extcon/extcon-arizona.c +++ b/drivers/extcon/extcon-arizona.c @@ -1744,6 +1744,7 @@ static int arizona_extcon_probe(struct platform_device *pdev) err_rise: arizona_free_irq(arizona, jack_irq_rise, info); err_gpio: + pm_runtime_put(&pdev->dev); gpiod_put(info->micd_pol_gpio); err_register: pm_runtime_disable(&pdev->dev); -- 2.17.1