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 B9E89382397; Wed, 8 Apr 2026 07:31:54 +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=1775633514; cv=none; b=M5692UfJHeIFeL76zkdLH1ricy5yewhO+xEd47Dg1OZ6+OLZ9dzlLP6Oci9CR4opoKXmvi7tmDgjNeQV0KtGZDsdRM19pM/PvYmyEKffEJJxKxUv9TMnjkBw54s9U8Yi9bDiosF16+XZC890mjP864/+XfMZ0G6COUtOC2vqShc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775633514; c=relaxed/simple; bh=FXyQ24BYf7morxcDyu4vsmcVP7Ek1/v6ZJhPAKuWC8g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=peJ/CGtWhpRsnnrMY1lPQa3mY/VvMygnMTNbNl0L08SSLtbhIFdGLunDClrwHTW7DvlnaqSYeva3rCup2B9KML41VvYLS6TsuboVn9zT2YGovyR0JQ0QyhoKdPr5Dj/TgIGHURIgs0XiwjZt8eZ8nvJKjVn++YU295ppApVn0TY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Kp8lQJ/L; 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="Kp8lQJ/L" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 62531C4AF0B; Wed, 8 Apr 2026 07:31:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1775633514; bh=FXyQ24BYf7morxcDyu4vsmcVP7Ek1/v6ZJhPAKuWC8g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Kp8lQJ/L0u5ybf9Q7lVrBotLS5woDg6adq2Isbvz5u2cgxwY7w2iWkR4uyQB00l01 bWxwl5INeJoZ3f+rC0yJqtYfV6VpxWP8fmSSP/wJpPYWh78Xt6EEr/RK4OsOgg7ZLz Gw76WnahwE55VYOFscSGryQyyy9PeI+2tGb+fDpD4+UaxBkKQ2NsBCwQaNSrBcrVyZ tu66aqkf/UYJlis6sEiepEmqxwEI45r4gFoEGTEqzLm/56oN2DpOjiLFNGpC9awhdP apvwRZOnrXkXyjOpSvNCkA2N/xZkEx8Qm4k0ZOe2CJAtpLd42+3EWDqMTpHhNnbtlb Tvd94MVByKmpA== Received: from johan by xi.lan with local (Exim 4.98.2) (envelope-from ) id 1wANOC-000000001Mj-038S; Wed, 08 Apr 2026 09:31:52 +0200 From: Johan Hovold To: Mark Brown Cc: Liam Girdwood , Marek Vasut , Bartosz Golaszewski , Matthias Brugger , AngeloGioacchino Del Regno , Krzysztof Kozlowski , =?UTF-8?q?Andr=C3=A9=20Draszik?= , Douglas Anderson , linux-kernel@vger.kernel.org, Johan Hovold , stable@vger.kernel.org, Dzmitry Sankouski Subject: [PATCH v2 5/7] regulator: s2dos05: fix OF node reference imbalance Date: Wed, 8 Apr 2026 09:30:53 +0200 Message-ID: <20260408073055.5183-6-johan@kernel.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260408073055.5183-1-johan@kernel.org> References: <20260408073055.5183-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: bb2441402392 ("regulator: add s2dos05 regulator support") Cc: stable@vger.kernel.org # 6.18 Cc: Dzmitry Sankouski Signed-off-by: Johan Hovold --- drivers/regulator/s2dos05-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/s2dos05-regulator.c b/drivers/regulator/s2dos05-regulator.c index 1463585c4565..a1c394ddbaff 100644 --- a/drivers/regulator/s2dos05-regulator.c +++ b/drivers/regulator/s2dos05-regulator.c @@ -126,7 +126,7 @@ static int s2dos05_pmic_probe(struct platform_device *pdev) s2dos05->regmap = iodev->regmap_pmic; s2dos05->dev = dev; if (!dev->of_node) - dev->of_node = dev->parent->of_node; + device_set_of_node_from_dev(dev, dev->parent); config.dev = dev; config.driver_data = s2dos05; -- 2.52.0