Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2149513pxb; Sun, 18 Apr 2021 20:58:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyfUdRmO0dZV9QecZNe75ZfikPA56sCgJVnXhaIqikgYC7hbLfNCX3/YF5ikuXtz/PF6mVn X-Received: by 2002:a17:90a:ce8d:: with SMTP id g13mr22374922pju.85.1618804720287; Sun, 18 Apr 2021 20:58:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618804720; cv=none; d=google.com; s=arc-20160816; b=qfW7BpSF0MMHdbjy5ZMdr4Q39SQqLIsEXoOuYplU5yVhKPVZNyJuQFivYfsVaObIkt S8e2qKe0hDx4UWnaloGOn3zBdaCpchuwXaWutwxYl9BIG9b7hYUQoPvTctJavx5gH/wE 9gaCzONrL+WW2Pzl1lAPy+ZrIshBy8wVdK0P1LJ/uKmdk0+6wXnixa/ir1KIHOTIZPGv Wb18QmYAw+LssCHHyIIt3lhVdAGar/xLR7W0Sotb1Gat9qjogQwhK4IdaydncSuUTYMX tZCeWgOvyYbhurewcdm9V6xw1FQJ/JS0VReFSn/dH+07qdBG4AVvBFsXpqGL4cNB8h9A GMyA== 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=/Jix1r3kLWi/Gyu6YMdkc++fJ1nyT+NHZ3y1qnqAOxI=; b=GR1kMYH5bkaKYDOaHgaL1fBvnyG30Z9bNS9l4q4s4PwOi3qtkjFl+505QIDR11jIaL FcjgAijmE8akd8yMgEjDivj7c4JIlkrtnsWUBFauJ+0u9CXJId9sFrDrHNrQOy8Qqxab n+mqFD7/IY0iRrUCybg8VryZ/jFN9exLHWHIl23wfjIl/cB91HyB065HU0ZodG9V+tzU UCiz5c8ZVRq6vWhv6w6vXHlisDRaAks/7YLSeyfte6nD5vj7BenVhQRuy7j3ttIvX1KP dNZGkGmky8g8N4/IL/rkg6Tn4SNKpMo8hlG97giurEsf/4vdwy5GEDIiYruir/slDvto tIbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=se5kpGDc; 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 77si7697015pfc.287.2021.04.18.20.58.15; Sun, 18 Apr 2021 20: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=@kernel.org header.s=k20201202 header.b=se5kpGDc; 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 S233148AbhDSDzp (ORCPT + 99 others); Sun, 18 Apr 2021 23:55:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:54278 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232317AbhDSDzp (ORCPT ); Sun, 18 Apr 2021 23:55:45 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id F386160FE9; Mon, 19 Apr 2021 03:55:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1618804515; bh=SF3Vix1P8gS9jHl8Flhawff8IyM6VZbyNcdAG2OtJKA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=se5kpGDcZwvcGN503psMe2/lB+RS+Ce+KAHPuTb1AFvHt5Gve9uFDHWLI0KW9L7nm 1QpQEYET0Uv1/+gnspr1L15OScJMP+PJkejrAben4U7sx1Z+agIXjMpCFtcE8KivoO howpD6fFFw0R/yMy/ibIFisYKA/jSyObrOZbZQjifVE5VbV9kGKmfOnpkIQ/OsNBfg XOM1CdOHVo4ZlanY9BcSQGUFKsJE1nRsek8Mcl+jHLiE+uaYXtN4SqgovzglR8CGlO eAZDLr/iTT5Ga4PyfiK7UKMGpd3j03StLsgNckE2xQax5UokHqqnYAop6jWhqhqtjK zUTXbftlK3ThQ== Date: Mon, 19 Apr 2021 11:55:10 +0800 From: Peter Chen To: Dinghao Liu Cc: kjlu@umn.edu, Pawel Laszczak , Roger Quadros , Aswath Govindraju , Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] [v2] usb: cdns3: Fix runtime PM imbalance on error Message-ID: <20210419035510.GA1870@nchen> References: <20210412054908.7975-1-dinghao.liu@zju.edu.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210412054908.7975-1-dinghao.liu@zju.edu.cn> User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21-04-12 13:49:07, Dinghao Liu wrote: > When cdns3_gadget_start() fails, a pairing PM usage counter > decrement is needed to keep the counter balanced. > > Signed-off-by: Dinghao Liu Applied, thanks. Peter > --- > > Changelog: > > v2: - Use pm_runtime_put_sync() to decrease refcount. > --- > drivers/usb/cdns3/cdns3-gadget.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/usb/cdns3/cdns3-gadget.c b/drivers/usb/cdns3/cdns3-gadget.c > index 582bfeceedb4..a49fc68ec2ef 100644 > --- a/drivers/usb/cdns3/cdns3-gadget.c > +++ b/drivers/usb/cdns3/cdns3-gadget.c > @@ -3255,8 +3255,10 @@ static int __cdns3_gadget_init(struct cdns *cdns) > pm_runtime_get_sync(cdns->dev); > > ret = cdns3_gadget_start(cdns); > - if (ret) > + if (ret) { > + pm_runtime_put_sync(cdns->dev); > return ret; > + } > > /* > * Because interrupt line can be shared with other components in > -- > 2.17.1 > -- Thanks, Peter Chen