Re: [PATCH 2/4] drm/bridge: display-connector: Fix I2C adapter resource leak

Johan Hovold <[email protected]>
Newsgroups org.kernel.vger.linux-renesas-soc,org.freedesktop.lists.dri-devel,org.kernel.vger.linux-devicetree,org.kernel.vger.stable
Message-ID <[email protected]>
On Mon, Jul 06, 2026 at 12:35:40AM +0300, Laurent Pinchart wrote:
> If the probe function returns an error after getting the I2C adapter for
> DDC, the reference to the adapter is never released. Fix it by releasing
> it in the bridge .destroy() handler.
> 
> There is no need to test the ddc pointer with !IS_ERR(), as
> of_get_i2c_adapter_by_node() returns NULL on error.

I stumbled over this this morning as well and posted a fix here (which
releases the adapter on driver unbind as is currently done):

	https://lore.kernel.org/lkml/[email protected]/

> Fixes: 6de79dd3a920 ("drm/bridge: display-connector: add ddc-en gpio support")

I believe this issue was first introduced by commit 2e2bf3a5584d
("drm/bridge: display-connector: add DP support") a few releases
earlier.

> Cc: [email protected]
> Signed-off-by: Laurent Pinchart <[email protected]>

Reviewed-by: Johan Hovold <[email protected]>

Johan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.