On Sat, Dec 14, 2024 at 10:26:52AM +0900, Joe Hattori wrote: > Current implementation of .probe() leaks a reference of i2c_adapter. > Implement an error path and call put_device() on the obtained > i2c_adapter in it to fix this refcount bug. > > This bug was found by an experimental static analysis tool that I am > developing. > > Fixes: 0c275c30176b ("drm/bridge: Add bridge driver for display connectors") > Signed-off-by: Joe Hattori <joe@xxxxxxxxxxxxxxxxxxxxx> > --- > Changes in V2: > - Omit the null check before calling i2c_put_adapter(). > --- > drivers/gpu/drm/bridge/display-connector.c | 27 +++++++++++++++------- > 1 file changed, 19 insertions(+), 8 deletions(-) Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx> -- With best wishes Dmitry