From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796228815; b=VkB42QVzeX6e5/EWTSRVy5UkoW+UYeE6S03Vx9WvZRVYfUhO7Ipq5ch9OP+eCFwPk01B BiwO1J8tlasQy92hMPg8seStOcsfLOSB9B21PERxEtzq3xpgc4r8SM7vsDSWfYKfU/tXo EFoW3JOGK4R+MZEdds70193Llly+2TGgDMPptTbrQOZlVFpfYUSLEqtanqfMOs+6LrSDV I/R2odhzb8WRv7+SUGoOja9gbkzTgDvYqyUymq7hCp14ELKrM3ZSkscaOMz073J/S+l4z yZQxnlPKb/UijgMtihGyjxHILY3LLsdKz//vohLd1/g1lB39ZLNaWVK9LWD9FJotffA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796228815; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=0srHbN4h8d8Q7oAzOALrICRd4WkFgS9/tiRVA2Lf18s=; b=WPEHDT6i8oANAJ3+bs0dElwJYcmKnqdPe6DZApzFIuDreMJKiTSoh4xrjqzGtiaT2l9O 3tfJa1LY8h1Fg1EvlXWx/1TmQnquyvFfR8SDGaJT2XLgZvgRqerzlcEqFP6LmaTN0oWn2 Zs6d69sLywmUBS6ZGeai/Ipt+tnTknGr/hbiZVWl2MXWbGQzxISVYXHrOHi4MZ0wYMfnl awy17NcwT0fzjLdRZBqGXyRnDSc8ezCUJ6Zkdyi+8FoS2KkcGlmnCbkfV+l1f4CnOftD0 s0DIhHoFdgQH3Lyukd4cOdc/AjFPYUMlrPVI5AJmZUX//s5NwTzJq0lYYGWv1SNUubQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=P7PQ1io4; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F270D606A327; Wed, 2 Dec 2026 16:26:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=P7PQ1io4 Received: by smtp.kernel.org (Postfix) with ESMTPSA id D28101F00899; Wed, 2 Dec 2026 16:26:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796228814; bh=0srHbN4h8d8Q7oAzOALrICRd4WkFgS9/tiRVA2Lf18s=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=P7PQ1io48tKW5N635Ejv6J2oyJn4kJ0sPUi/NFvlcbfjWmAUwEQt6ZQnY3wK8AuGD IgzjwQFhSp3vTQ50akj8acIf9do2keWHLXFvGqHOzTGH2AF4SNmBHrTXpj5iohnjVd sweiMIHycN9rCUmySWmX+Fz2bScq29OQLhAGmTk/JmdGJZ/O7V8ACWfOkXkJbztDG+ dqU7lXQnfBbHGBLyf0H5wsLyEOShly6GtfwNEsjyRW8d8egBsSCdvSDPy0Q1H9aYhY C9OZl5lS6pCm20r4F5s3k3aypT/4YQM6UK0jmcPfD9xbf1Ez9iRdxXJFmOlFYpTTSt 9JdSs4DU6716g== Date: Wed, 2 Dec 2026 16:26:49 +0000 From: Lee Jones To: Tian Xuechen <202300460064@mail.sdu.edu.cn> Cc: aaro.koskinen@iki.fi, andreas@kemnade.info, khilman@baylibre.com, rogerq@kernel.org, tony@atomide.com, j-keerthy@ti.com, mfd@lists.linux.dev, linux-omap@vger.kernel.org, liguangshuo@mail.sdu.edu.cn Subject: Re: [PATCH 1/2] mfd: lp873x: Remove the child devices on unbind Message-ID: <20261202162649.GL43081@kernel.org> References: <20261126132803.4091137-1-202300460064@mail.sdu.edu.cn> <20261126132803.4091137-2-202300460064@mail.sdu.edu.cn> X-Mailing-List: linux-omap@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261126132803.4091137-2-202300460064@mail.sdu.edu.cn> On Thu, 26 Nov 2026, Tian Xuechen wrote: > From: Tian Xuechen <202300460064@mail.sdu.edu.cn> > > The regulator and GPIO children stay registered when the I2C driver > is unbound, although they use the parent's managed data. Use managed > MFD registration so the children are removed first. > > This issue was found by our static analysis tool under development. > > Fixes: dc21c7ad3a8a ("mfd: lp873x: Add lp873x PMIC support") > Signed-off-by: Tian Xuechen <202300460064@mail.sdu.edu.cn> > --- > drivers/mfd/lp873x.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/mfd/lp873x.c b/drivers/mfd/lp873x.c > index ab7bd46d9ff7..6b2badab4f2d 100644 > --- a/drivers/mfd/lp873x.c > +++ b/drivers/mfd/lp873x.c > @@ -53,8 +53,8 @@ static int lp873x_probe(struct i2c_client *client) > > i2c_set_clientdata(client, lp873); > > - ret = mfd_add_devices(lp873->dev, PLATFORM_DEVID_AUTO, lp873x_cells, > - ARRAY_SIZE(lp873x_cells), NULL, 0, NULL); > + ret = devm_mfd_add_devices(lp873->dev, PLATFORM_DEVID_AUTO, lp873x_cells, > + ARRAY_SIZE(lp873x_cells), NULL, 0, NULL); > > return ret; Same here. -- Lee Jones