From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 97CB8279792; Tue, 7 Apr 2026 12:21:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775564483; cv=none; b=RW3cOqW0uHQs7JrqVA5j2Px3f4WVGx6W5mexK9CD8tf4IHpBLM1D7s34mtZVGEJz11S2NXYl9razYaxdYVijMEJZ3zVppSgUHjRIN7oP35G2zKnq6bWS0wgzsQSM7LzEjVHYIdtjPDE17CHbxDPcI8QLZChS6MlQKbhGr+H8LNM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775564483; c=relaxed/simple; bh=jrQBeK2x6KLluU2H0Ges4ATakn3LsGMgIHcBGMIrXB0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=twLLBxSrRXAaHkcGqLxN+Irw/DzfFdzecba23m9YJXLflYBgzimB5DcMEmDBcbWvi3+ovGjUJNQjbFo3y1lcwOkZ7JUvVGNVUE+D/RB0cxb3o34gGYNPGpTJMIG/9SjuPTGrPfUsjFAKhcbDYVl3YkduG5yzBJRDoVBuQ+h09+o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=PmASZz3m; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="PmASZz3m" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7360AC2BCB0; Tue, 7 Apr 2026 12:21:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1775564483; bh=jrQBeK2x6KLluU2H0Ges4ATakn3LsGMgIHcBGMIrXB0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PmASZz3mzPigCoOU3VTC0MMR69Ji4P0O79gQuVls7oHnYViE7WiS01wCItjwZi+z5 GzS6aSYgQoBWebmcCi68qP1lO/2ffVsz2KsU12chhQqXnnOunCXN7krahC43jLZjUB vdtN1OcHlygmrzfQblQGCkgmdAgrF7HOWYO4wH0S2Z4foWcKPrSQ5DFQEgu+p8+18q CNajA1QJh7By5ZhMYd2ma6XSP69INSz63GYrv53aIymOvsAx7u+M1dwojriYCd12cX wJadn2kVrZJjv6KaZu+v4XhJSMzfCH7IQAcsGGza1eIMk63yWt14CiiOgF9gJMpXcO 8xRpdfuCid1bA== Received: from johan by xi.lan with local (Exim 4.98.2) (envelope-from ) id 1wA5Qn-0000000BCSA-0o2p; Tue, 07 Apr 2026 14:21:21 +0200 From: Johan Hovold To: Mark Brown Cc: Liam Girdwood , Bartosz Golaszewski , Matthias Brugger , AngeloGioacchino Del Regno , Krzysztof Kozlowski , =?UTF-8?q?Andr=C3=A9=20Draszik?= , linux-kernel@vger.kernel.org, Johan Hovold , stable@vger.kernel.org Subject: [PATCH 2/3] regulator: mt6357: fix OF node reference imbalance Date: Tue, 7 Apr 2026 14:20:30 +0200 Message-ID: <20260407122031.2669397-3-johan@kernel.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260407122031.2669397-1-johan@kernel.org> References: <20260407122031.2669397-1-johan@kernel.org> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The driver reuses the OF node of the parent multi-function device but fails to take another reference to balance the one dropped by the platform bus code when unbinding the MFD and deregistering the child devices. Fix this by using the intended helper for reusing OF nodes. Fixes: dafc7cde23dc ("regulator: add mt6357 regulator") Cc: stable@vger.kernel.org # 6.2 Signed-off-by: Johan Hovold --- drivers/regulator/mt6357-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/mt6357-regulator.c b/drivers/regulator/mt6357-regulator.c index 1eb69c7a6acb..09feb454ab6b 100644 --- a/drivers/regulator/mt6357-regulator.c +++ b/drivers/regulator/mt6357-regulator.c @@ -410,7 +410,7 @@ static int mt6357_regulator_probe(struct platform_device *pdev) struct regulator_dev *rdev; int i; - pdev->dev.of_node = pdev->dev.parent->of_node; + device_set_of_node_from_dev(&pdev->dev, pdev->dev.parent); for (i = 0; i < MT6357_MAX_REGULATOR; i++) { config.dev = &pdev->dev; -- 2.52.0