Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp6128517iog; Thu, 23 Jun 2022 11:57:50 -0700 (PDT) X-Google-Smtp-Source: AGRyM1u1Xp1Kj9vfSi+XGT8rQvuBhoMqcAu7dkMFb+LBAcaEzkuw66b1GcSGmGV+A6kjS+Rgh88J X-Received: by 2002:a05:6402:370c:b0:435:cb14:9aa8 with SMTP id ek12-20020a056402370c00b00435cb149aa8mr6255895edb.35.1656010670451; Thu, 23 Jun 2022 11:57:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656010670; cv=none; d=google.com; s=arc-20160816; b=d/i9nTPGZwOxK8otzOwxLdL0+/XdMo29CkuWaZXHv4Ek6DYfcu2rvrcpu6OLr/47MV Tm1DW2ehrBG/DbyqZ6AgO+rUjVcXyEzAlH2cFfKcjqrGpZSLGL4pzuSFzcwweEY/vR4r YDwdqxnXldoqjHqIGAMvjZxUn8TTw8Z9hlIF+yCPlRs46rG3eJTMuJtyLoBVqDBk6vsx oD+A08ccnJMBcbBDVKjRgy4ZUBM6k7jadzXjkh6oUdwGBRQEW93IT16vPfi1B2C1hH8H IAcyRpSE7tQ+Qwe9JJslyBkPdbw5CAtJtezdTAO10z7NHQlFXTtgfYs0+GHaQOhZdpNx fjBQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=GTXmFgNLlwD/Sz+kTnqdSjAwfLYBAynRYyX/0AaEho0=; b=cFMAS/YQ8z2kFslTTGDp5KNszn0cjmk3ENH2aeP+boJ0B6sSeHzDp/G3ONF5rSjQ54 p53TTPMHCltNWfWMDN5BAHHwP44Xcd70lYw8gCAU3bha/vgB1kPlj7OTbyShRhbwI57c 0OqKE9ancHkY9+yPex699DB8slAcFAaBhq3xzUFLT2BoQgE3eTCbC8jGCjN0Pm4Gomo1 iweJO1VL54B5obD/u5X7BN2n6bjC5fxqvZ6SDVBrz6k91ilKuCCbGXNdFH/0iItVOv9c b5TyaSt3wAVwKjN98sqxE2bEuYLVqiMdKdo2nwZaCrPM5YE1a91TBi7Uf63mW6JE4hE7 Gxgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="djb/0a7V"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y7-20020a056402270700b00435681044a9si470186edd.372.2022.06.23.11.57.25; Thu, 23 Jun 2022 11:57:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="djb/0a7V"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237009AbiFWSVZ (ORCPT + 99 others); Thu, 23 Jun 2022 14:21:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237167AbiFWSRz (ORCPT ); Thu, 23 Jun 2022 14:17:55 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BEC35AA336; Thu, 23 Jun 2022 10:24:18 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 233AA61EE8; Thu, 23 Jun 2022 17:24:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F1E14C3411B; Thu, 23 Jun 2022 17:24:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656005057; bh=RtnkC+Zd5PLvuMjSoS69I7jTZRYHnzlwdpihdzsu7YQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=djb/0a7ValtAw17+w5+Lk4/mExeHZrsbC3/59AACfeHvyFI1mzpNoSHg9trdqWbDx vCerc/oooMayEo9f2Eybto/o+61tYFyx/2p4i7uMy3GTjwTks9gWGAjFmq7aUnTSnL Tul3oaoN+yOwc8sVez4WPpAp0vvuiVNyOM9n5h1Y= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, stable , Miaoqian Lin Subject: [PATCH 4.19 215/234] usb: gadget: lpc32xx_udc: Fix refcount leak in lpc32xx_udc_probe Date: Thu, 23 Jun 2022 18:44:42 +0200 Message-Id: <20220623164349.135042043@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220623164343.042598055@linuxfoundation.org> References: <20220623164343.042598055@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Miaoqian Lin commit 4757c9ade34178b351580133771f510b5ffcf9c8 upstream. of_parse_phandle() returns a node pointer with refcount incremented, we should use of_node_put() on it when not need anymore. Add missing of_node_put() to avoid refcount leak. of_node_put() will check NULL pointer. Fixes: 24a28e428351 ("USB: gadget driver for LPC32xx") Cc: stable Signed-off-by: Miaoqian Lin Link: https://lore.kernel.org/r/20220603140246.64529-1-linmq006@gmail.com Signed-off-by: Greg Kroah-Hartman --- drivers/usb/gadget/udc/lpc32xx_udc.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/usb/gadget/udc/lpc32xx_udc.c +++ b/drivers/usb/gadget/udc/lpc32xx_udc.c @@ -3021,6 +3021,7 @@ static int lpc32xx_udc_probe(struct plat } udc->isp1301_i2c_client = isp1301_get_client(isp1301_node); + of_node_put(isp1301_node); if (!udc->isp1301_i2c_client) { retval = -EPROBE_DEFER; goto phy_fail;