Re: [PATCH v2 drm-dp 01/10] drm/hisilicon/hibmc: fix the i2c device resource leak when vdac init failed
From: Dmitry Baryshkov
Date: Sat Jun 28 2025 - 12:06:12 EST
On Fri, Jun 20, 2025 at 05:30:55PM +0800, Yongbang Shi wrote:
> From: Baihan Li <libaihan@xxxxxxxxxx>
>
> Currently the driver missed to clean the i2c adapter when vdac init failed.
> It may cause resource leak.
>
> Fixes: a0d078d06e516 ("drm/hisilicon: Features to support reading resolutions from EDID")
> Signed-off-by: Baihan Li <libaihan@xxxxxxxxxx>
> Signed-off-by: Yongbang Shi <shiyongbang@xxxxxxxxxx>
> ---
> ChangeLog:
> v1 -> v2:
> - use the hibmc_ddc_del() in hibmc_connector_destroy(), suggested by Dmitry Baryshkov.
> - fix the tag, suggested by Dmitry Baryshkov.
> ---
> drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h | 1 +
> drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_i2c.c | 5 +++++
> drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c | 11 ++++++++---
> 3 files changed, 14 insertions(+), 3 deletions(-)
>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>
--
With best wishes
Dmitry