From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gloria.sntech.de (gloria.sntech.de [185.11.138.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B7ED510785 for ; Sat, 21 Feb 2026 14:52:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.11.138.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771685532; cv=none; b=Lqc2GpCjgQm/PmmM2Aa78F47tKuXpsWC/x35iYMYkKxNOAmkGgRrkFVICE4+j64fZLgCpTAXyPd0Q1usEq/mzQNketlDK3EyyROKMtKblubM4hlu4HChHg8q910jNjISlv/iu75U9coJ7BTxN2ELy31WCdXhRaSyYoqPRawoZkQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771685532; c=relaxed/simple; bh=pZD1ZlANrf8P/MlRStCUZSXgHOShp4rteLirP3rZbn8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=n6DVQz6/PMZxti/ip2rj0y8Rw4A1EXVSr8TnhFixiydhxNyF3EwPsDov9Tg3Qr5M1DgEKB2YgIb0oz6AxcrYzH83qvXYvqrwDq8wghaCB2Z5ihr9Z58YQ9JW1/zL3tQ03bHWC5Yx7rGwcp1rY6Qi1wnHZPs2E+A7/JpIeMjUZNQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=sntech.de; spf=pass smtp.mailfrom=sntech.de; dkim=pass (2048-bit key) header.d=sntech.de header.i=@sntech.de header.b=i4zTMbVo; arc=none smtp.client-ip=185.11.138.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=sntech.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sntech.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sntech.de header.i=@sntech.de header.b="i4zTMbVo" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sntech.de; s=gloria202408; h=Content-Type:Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Reply-To; bh=pZD1ZlANrf8P/MlRStCUZSXgHOShp4rteLirP3rZbn8=; b=i4zTMbVo45tAtv8y/QZj4XJPMa U0BoNhx2iqCg+9mdhs17QPCQlaIx1n53MSWKvJgXCz+fHroUqXp1fy6Y5JZ5L/tvDeTdZ76CnWYtE U2cHEGdUoROjlFWk3Ca/OlhVkjyYwgmNeQT1CdsTeSSrTZEWJSeJG4oHKPjFjjoGr3pIYhusaw45O EogR4X49qGWUrKbvABVh0/k2OotblR7YVfknp0xzYOH1awiK48Njyj6m7pOtJ74Txy5WPCy4X3uym 9hrZ9AMFN9WS1TNPtToorUu7dTwblrZeozUA4tfVm0CrQ2wwZlziNRx+54TJ1np1oOAdMgVTV325K JqQZoMqg==; From: Heiko =?UTF-8?B?U3TDvGJuZXI=?= To: shawn.lin@rock-chips.com, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, xiaopeitux@foxmail.com Cc: Pei Xiao , Felix Gu Subject: Re: [PATCH] soc: rockchip: grf: fix device node refcount leak in error path Date: Sat, 21 Feb 2026 15:51:46 +0100 Message-ID: <6295978.F8r316W7xa@diego> In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Hi, Am Samstag, 21. Februar 2026, 01:40:27 Mitteleurop=C3=A4ische Normalzeit sc= hrieb xiaopeitux@foxmail.com: > From: Pei Xiao >=20 > The for_each_matching_node_and_match() macro automatically manages device > node reference counts during normal iteration. However, when breaking out > of the loop early with return, the current iteration's node is not > automatically released, leading to a reference count leak. >=20 > Fix this by adding of_node_put() before returning from the loop > when fails. >=20 > Fixes: 75fb63ae0312 ("soc: rockchip: grf: Support multiple grf to be hand= led") > Signed-off-by: Pei Xiao =46elix Gu was slightly faster [0], so I'll apply their patch once the merg= e- window is closed. Thanks Heiko [0] http://lore.kernel.org/r/20260217-grf-v1-1-2088c966875d@gmail.com