Re: [PATCH 2/4] drm/bridge: display-connector: Fix I2C adapter resource leak
Laurent Pinchart <[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 Fri, Jul 17, 2026 at 05:03:49PM +0200, Johan Hovold wrote: > 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. You're right. I'll update the Fixes: tag. > > Cc: [email protected] > > Signed-off-by: Laurent Pinchart <[email protected]> > > Reviewed-by: Johan Hovold <[email protected]> -- Regards, Laurent Pinchart