Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2875211rwb; Mon, 15 Aug 2022 13:05:55 -0700 (PDT) X-Google-Smtp-Source: AA6agR5l6xV2dmjI53MWpSXlkQssJjWWDTAx0f/O89FRH+thBbVYbNk5PT9tc1cWe0RDQSv6HWKX X-Received: by 2002:a17:907:3e91:b0:730:ba28:28d2 with SMTP id hs17-20020a1709073e9100b00730ba2828d2mr12175318ejc.10.1660593954926; Mon, 15 Aug 2022 13:05:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660593954; cv=none; d=google.com; s=arc-20160816; b=TvvNctXKQmnyDpE+zJt4PdrApuZi7Nodrdbj1cxmS9Bc3zZ38yOb8eNynljZa7x4Za M4toG1HH8dhG8XCTW1BMfIo1m9yoFkj4U3Lj0Vlzarb09Q0Uzs4lX1HZ3whRGHhWBg2F ehZ7On0mEPnxm4gk2YPFuonSZ9yzru6u6FZpmf3e/NREcbL4QiwCSgraDAf9Zua06Mlc BeekWB4reI0W6C7CZSJ3F8WKyd5HW6WACeFxsw9Q1i+MVuUBbV+Oqx0rwoSaGJmSBvpX xfNIfCe4R1FqQZNwVamH+YiNxmDAt3lK2FR8C+NXs2RYe5/h4HLujylub4B3Wj0760MG Q+5A== 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=e1U4t06N+L15DRXZodAr86b8KhT1tlPe6Rz62hYlsAw=; b=I+f7BM4duFM30EBvi2GC/9UJQQCm02X7K3kMY+T7ceN/hb7TDYLwTveJVvr3aiSkg9 LIyEfQZUHEk+p1Z1pHOTSXRGzY6T7rCrgS2aPgwNmxQyNBQVgcLKn76iheTaiExBMUQy KJzqBX6NoCLqeYQLk75nCsDsaXr8YZ8fGIuLhWbUwzLCt1bhEWAPP7SxyY2cSCUAUIUi P5t6nh1rzbaJvVgjfKcfzAX//pitxnbQvUrhX41uS94Yqkrx3F0cAvnkpAc20tpJjKLZ nd6JsAY2b14NDghJiKU6+yHFD2FxWUz4w/ykPQ5OB4iH5u4IgPZxg9eyMtnklwEyfqa2 LWgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=QjybJC5c; 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 sc29-20020a1709078a1d00b007316c60ed16si9451942ejc.749.2022.08.15.13.05.29; Mon, 15 Aug 2022 13:05:54 -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=QjybJC5c; 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 S245568AbiHOTFw (ORCPT + 99 others); Mon, 15 Aug 2022 15:05:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60150 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245566AbiHOTCW (ORCPT ); Mon, 15 Aug 2022 15:02:22 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D586933436; Mon, 15 Aug 2022 11:33:30 -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 ams.source.kernel.org (Postfix) with ESMTPS id 5A80EB81081; Mon, 15 Aug 2022 18:33:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A1065C433C1; Mon, 15 Aug 2022 18:33:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660588408; bh=GOWshVnBwy6EwloCgplMH55chcLT2EZdBYc4L1saBCk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QjybJC5claaT44IqMOsmFiw5kQR+Tb81WCaWUx57Uk1qmYruyQh0CjRZ7ydR1pE+k T12qReVfcO0I7TQ/gn6UMJ9ZoxplUiRXOkY/FytSRHDHgldZ3kt9mmMM5G9JjNGCOz JGJKjQvwtQNPL7DmlVYvqrL5ZhvmvqX9qw//dDKA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Liang He , Peter Rosin , Wolfram Sang , Sasha Levin Subject: [PATCH 5.15 363/779] i2c: mux-gpmux: Add of_node_put() when breaking out of loop Date: Mon, 15 Aug 2022 20:00:07 +0200 Message-Id: <20220815180352.756604330@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180337.130757997@linuxfoundation.org> References: <20220815180337.130757997@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 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: Liang He [ Upstream commit 6435319c34704994e19b0767f6a4e6f37439867b ] In i2c_mux_probe(), we should call of_node_put() when breaking out of for_each_child_of_node() which will automatically increase and decrease the refcount. Fixes: ac8498f0ce53 ("i2c: i2c-mux-gpmux: new driver") Signed-off-by: Liang He Acked-by: Peter Rosin Signed-off-by: Wolfram Sang Signed-off-by: Sasha Levin --- drivers/i2c/muxes/i2c-mux-gpmux.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/i2c/muxes/i2c-mux-gpmux.c b/drivers/i2c/muxes/i2c-mux-gpmux.c index d3acd8d66c32..33024acaac02 100644 --- a/drivers/i2c/muxes/i2c-mux-gpmux.c +++ b/drivers/i2c/muxes/i2c-mux-gpmux.c @@ -134,6 +134,7 @@ static int i2c_mux_probe(struct platform_device *pdev) return 0; err_children: + of_node_put(child); i2c_mux_del_adapters(muxc); err_parent: i2c_put_adapter(parent); -- 2.35.1