Re: [PATCH v2 1/2] drm/bridge: anx7625: Fix refcount bug in anx7625_parse_dt()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 19 Jul 2022 at 08:55, Liang He <windhl@xxxxxxx> wrote:
>
> In anx7625_parse_dt(), 'pdata->mipi_host_node' will be assigned a
> new reference with of_graph_get_remote_node() which will increase
> the refcount of the object, correspondingly, we should call
> of_node_put() for the old reference stored in the 'pdata->mipi_host_node'.
>
> Fixes: 8bdfc5dae4e3 ("drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP")
> Signed-off-by: Liang He <windhl@xxxxxxx>
> ---
>  changelog:
>
>  v2: (1) rebase with drm-misc-next advised by Robert Foss
>      (2) use proper title
>      (3) remove the v1's second bug ('ep0'), fixed recently
>  v1: https://lore.kernel.org/all/20220707012330.305646-1-windhl@xxxxxxx/
>
>  drivers/gpu/drm/bridge/analogix/anx7625.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c
> index d1f1d525aeb6..79fc7a50b497 100644
> --- a/drivers/gpu/drm/bridge/analogix/anx7625.c
> +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c
> @@ -1642,6 +1642,7 @@ static int anx7625_parse_dt(struct device *dev,
>         anx7625_get_swing_setting(dev, pdata);
>
>         pdata->is_dpi = 0; /* default dsi mode */
> +       of_node_put(pdata->mipi_host_node);
>         pdata->mipi_host_node = of_graph_get_remote_node(np, 0, 0);
>         if (!pdata->mipi_host_node) {
>                 DRM_DEV_ERROR(dev, "fail to get internal panel.\n");
> --
> 2.25.1
>

This series has my r-b.
Reviewed-by: Robert Foss <robert.foss@xxxxxxxxxx>

Applied series to drm-misc-next.



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux