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 B638E382391; 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=SWpYQ1Z7wOXbxJ+f1UiWFRMtPfVk9yd1bMvqmVwhQ5DXq40INqBfEovQwyFGedmucgfxpLTRC1awWX5StP0sI5dZTqPNV8Ls154PJgcB+MqTsx4IyFypsH83f0FpkWhHOxSBOj17YSk5fumrDA77LcRQSoY7T3DHHWykncPhqtI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775633514; c=relaxed/simple; bh=slJlP5Oupwv22k8EjAyL7vWShwGKljKVWC/OLb7mvT8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BqhXoUZ+orF0fWBwf7WTGWH7KuHiBVPdOzD2MzMkWNHItvlDSBB3ONTwqi3pX0uEm7ZLU6yHt8VMPtFHpzqkkMdNdxUFzB/2VXZTTInULotG8yU0048hFH8o3Rw3bPlLeo8uZ6HQIFeYJTKnh8lYc89JhuAQ1CFsR4aCsZlwdFw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=XQOEqoQW; 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="XQOEqoQW" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 636B4C2BCB0; 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=slJlP5Oupwv22k8EjAyL7vWShwGKljKVWC/OLb7mvT8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XQOEqoQWloPSOQE7rPu6gn8DpCMMR3iHcC34jeF8eya+wNeGK4Y+I4UyGUD3Z6jD4 ZpjSvv4+ZTZaSmjv3qBtb+DcwBJH6lVMF5mVErASbMOuqgiEtMu/nFqksU0kJh6Iwv QTna/OeQ06gaSbEheKdkbIt7LwtOR45ol+xMgqcHu+fqU5R6wCNX178ElARKKO70qL o2fjD5jxHYdNo8MmDMTmIYjJRwHqq2UjIocR573+PzY8QrzwI8Oq/9K4C2VcQEn2p2 s+IeCTvQ8qp40k57T6Bht4T+Q06cWIT3xYMn8EdZmxuhsu45Fn0G2VrX8JC4IRtIOn dPR3VVVrsiatw== Received: from johan by xi.lan with local (Exim 4.98.2) (envelope-from ) id 1wANOB-000000001Mb-3uDV; Wed, 08 Apr 2026 09:31:51 +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, Chris Morgan Subject: [PATCH v2 1/7] regulator: bq257xx: fix OF node reference imbalance Date: Wed, 8 Apr 2026 09:30:49 +0200 Message-ID: <20260408073055.5183-2-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: linux-kernel@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: 981dd162b635 ("regulator: bq257xx: Add bq257xx boost regulator driver") Cc: stable@vger.kernel.org # 6.18 Cc: Chris Morgan Reviewed-by: Douglas Anderson Signed-off-by: Johan Hovold --- drivers/regulator/bq257xx-regulator.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/regulator/bq257xx-regulator.c b/drivers/regulator/bq257xx-regulator.c index dab8f1ab4450..711dbe045383 100644 --- a/drivers/regulator/bq257xx-regulator.c +++ b/drivers/regulator/bq257xx-regulator.c @@ -142,8 +142,7 @@ static int bq257xx_regulator_probe(struct platform_device *pdev) struct device_node *np = dev->of_node; struct regulator_config cfg = {}; - pdev->dev.of_node = pdev->dev.parent->of_node; - pdev->dev.of_node_reused = true; + device_set_of_node_from_dev(&pdev->dev, pdev->dev.parent); pdata = devm_kzalloc(&pdev->dev, sizeof(struct bq257xx_reg_data), GFP_KERNEL); if (!pdata) -- 2.52.0