Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3091704rwb; Mon, 15 Aug 2022 17:55:37 -0700 (PDT) X-Google-Smtp-Source: AA6agR7nL7lNNZN+FR6EBWyuPxc3l+W9QSqSUdWJ1b6jI37//gVcXbunaY7A5sgMVlXzrd5xjRmt X-Received: by 2002:a17:906:7304:b0:6ff:a76:5b09 with SMTP id di4-20020a170906730400b006ff0a765b09mr11490757ejc.193.1660611337098; Mon, 15 Aug 2022 17:55:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660611337; cv=none; d=google.com; s=arc-20160816; b=h2Kwj89d/FlEiu3sKD7GiYY+l2633R4pxRiO0aWnOxEfZsEJFng+itUfZXJp+10Oa7 2Wtcc1bpdZtJZHxx1+eSp8ly2eGPP4PoklVkon9BSUX7zeSgXkPungXC2QoaLas78PZ8 16DuzmY9Ep3L9hNPmGYqePLmUsXRSw+SMw0aBu1+Y5Ulg+m+yIKgjsPMfoAxz1ubrxEg j127q5da/NnzTipVyRsUJinZ46BUIaKikonGU1qIDwjtvngtHbjWkUwp0kcnmq2XIb5x jmC5LDy1mlZv0ShYZx0SJEEfgrwisB4M3grlD0vBS4SA80kTFJ9CJQ8ipOSZB4gSjMNG mfVQ== 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=tDVNCUfcTHKIGeiL+ueKSbA0LWfO0WjjrWx1zr3RZAIWXbt9iFegr38IvZqMJOBsYS FJuSXs42afaZ2RRfzykZXjB7aQlt94x9Gkm/XlmbtGRvKfyOFcvkmjwgo9715p9Stkwl Oono1JHF7tvvzn4bvJHuuVffft4lZrJ7QmTVvt5x+uLLISIt8y0M3VXcP1PqcLrNuoe4 iyBT2xcr3fcYZHWvpCLAXR6xdAlLcsktFRKKJ46OlxFML6Q/R4/reJv2ADqh2bPBqv+R yaG4MIGHMM2Gca9Hrec5tQ4P1xx2Q2+ztnMO7Gup2DEeULnZOE2nFNeozyrxxwGFBmbi r8eA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=sipzF46a; 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 x17-20020a05640226d100b0043d373fd120si9704136edd.47.2022.08.15.17.55.11; Mon, 15 Aug 2022 17:55:37 -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=sipzF46a; 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 S1355830AbiHPABl (ORCPT + 99 others); Mon, 15 Aug 2022 20:01:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1356222AbiHOXx6 (ORCPT ); Mon, 15 Aug 2022 19:53:58 -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 860EBC6B75; Mon, 15 Aug 2022 13:18:50 -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 73338B8115B; Mon, 15 Aug 2022 20:18:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9A5B1C433B5; Mon, 15 Aug 2022 20:18:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660594727; bh=GOWshVnBwy6EwloCgplMH55chcLT2EZdBYc4L1saBCk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sipzF46aevEhSKQYq1VcwZlzXl3Zzdr1TAvM8l4+3z3UYiSHvxlE5PKqQYpzQzir+ kAnYxRFitke8LEVqV28iHz5YV1HdHDp7OmrWLBFJZr4tFws9hZwamCD/lHU83nwk/H //bZnGcdPsR76OwVLQciGf6GGL6pVC4Lf7AVRWeg= 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.19 0539/1157] i2c: mux-gpmux: Add of_node_put() when breaking out of loop Date: Mon, 15 Aug 2022 19:58:15 +0200 Message-Id: <20220815180501.225104355@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@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