Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2764486pxj; Sun, 6 Jun 2021 13:15:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxNWM1q4t9M0Sb1OqUynoslvCICmuY61pXjpvaB3j0PsRm4NRNw5KZVS+2l0KEwPn5G4lw5 X-Received: by 2002:a17:907:1b20:: with SMTP id mp32mr14890691ejc.495.1623010503485; Sun, 06 Jun 2021 13:15:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623010503; cv=none; d=google.com; s=arc-20160816; b=HUXeVukYh8A6m21VNdM5bYNNw4NaQqio/ICEwTq45mKy7URZ8e15bTdodgwEAZfa65 QDVeoUPJn3jcpBtGoOPUBiY0lCLer1PobdxkeIetViD6MFoPVGZnFZe0BXPHHJSLtiN3 pu/lD2MhaYxBx/LPfROCMCrzTgQav4hIgfrNfXQdw4jy5HewNJAiv5ZL5gvMIVj8PpRy AwKZ/jqXF9xLDAf4G6MjVDvw0MZ8djlbjxAMq8npuQ9ajhLYZeusgnwvsaicIPLMZm8p phcuX3VbfC5aiSF8DzlOz6Lte/3bqnAQiXf1u/Iiq9LNUcwDy1o16FZY9COXjPEX14AE Ckrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=DfDHPNpeVOJOuxqCAU0cyCMqZID6gYmTU7KnVHL6Xe4=; b=yY3j00aBlPGhnW1VCC8rVY/SHyqP85ycW7pKuaW9zzcy1hZfCczp3PALoj5M7IMMVf sZN1hlnJg+qsf7oRI+A6UnnA6lDPro8nmrVNe4bVRAb+4sDWguM18XTLByBW9E+Csivy HETKJKPAqqylNt1USAQ9BpzWy+dKsQ+nar8xH4xpA1Zm9Y68eRcYqPgl2M1MjNvDd1Yp ZWbcLUH37varny6WViQBNZhWINZbtcMF123cvN0mQtg7KbIIwz8wXxFBmz7vfVPXklzY TdarN8JXsBRPhDYcLPN2TZHkdB/0oBaSSH5p+pluErnKjTtMKSCZYPZd+HVJfovVfhnr 7dCQ== 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p7si5063244edi.109.2021.06.06.13.14.41; Sun, 06 Jun 2021 13:15:03 -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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230132AbhFFUNJ (ORCPT + 99 others); Sun, 6 Jun 2021 16:13:09 -0400 Received: from fgw23-7.mail.saunalahti.fi ([62.142.5.84]:57732 "EHLO fgw23-7.mail.saunalahti.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229813AbhFFUNI (ORCPT ); Sun, 6 Jun 2021 16:13:08 -0400 Received: from localhost (88-115-248-186.elisa-laajakaista.fi [88.115.248.186]) by fgw23.mail.saunalahti.fi (Halon) with ESMTP id 5087b670-c703-11eb-8ccd-005056bdfda7; Sun, 06 Jun 2021 23:11:01 +0300 (EEST) From: Andy Shevchenko To: Greg Kroah-Hartman , Heikki Krogerus , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Andy Shevchenko Subject: [PATCH v1 1/3] usb: typec: intel_pmc_mux: Put fwnode in error case during ->probe() Date: Sun, 6 Jun 2021 23:09:09 +0300 Message-Id: <20210606200911.32076-1-andy.shevchenko@gmail.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org device_get_next_child_node() bumps a reference counting of a returned variable. We have to balance it whenever we return to the caller. Fixes: 6701adfa9693 ("usb: typec: driver for Intel PMC mux control") Cc: Heikki Krogerus Signed-off-by: Andy Shevchenko --- drivers/usb/typec/mux/intel_pmc_mux.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/typec/mux/intel_pmc_mux.c b/drivers/usb/typec/mux/intel_pmc_mux.c index 46a25b8db72e..134325444e6a 100644 --- a/drivers/usb/typec/mux/intel_pmc_mux.c +++ b/drivers/usb/typec/mux/intel_pmc_mux.c @@ -645,6 +645,7 @@ static int pmc_usb_probe(struct platform_device *pdev) return 0; err_remove_ports: + fwnode_handle_put(fwnode); for (i = 0; i < pmc->num_ports; i++) { typec_switch_unregister(pmc->port[i].typec_sw); typec_mux_unregister(pmc->port[i].typec_mux); -- 2.31.1