[PATCH] drm: fix missing reference counting decrease
Harry Wentland
harry.wentland at amd.com
Tue Feb 9 15:48:35 CET 2016
This looks good but we should probably do the same for all return paths
when reference for port has been acquired.
Please see attached patch.
Thanks,
Harry
On 2016-02-01 11:08 AM, Insu Yun wrote:
> In drm_dp_mst_allocate_vcpi, it returns true in two paths,
> but in one path, there is no reference couting decrease.
>
> Signed-off-by: Insu Yun <wuninsu at gmail.com>
> ---
> drivers/gpu/drm/drm_dp_mst_topology.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c
> index 6ed90a2..fe273b6 100644
> --- a/drivers/gpu/drm/drm_dp_mst_topology.c
> +++ b/drivers/gpu/drm/drm_dp_mst_topology.c
> @@ -2446,6 +2446,7 @@ bool drm_dp_mst_allocate_vcpi(struct drm_dp_mst_topology_mgr *mgr, struct drm_dp
> DRM_DEBUG_KMS("payload: vcpi %d already allocated for pbn %d - requested pbn %d\n", port->vcpi.vcpi, port->vcpi.pbn, pbn);
> if (pbn == port->vcpi.pbn) {
> *slots = port->vcpi.num_slots;
> + drm_dp_put_port(port);
> return true;
> }
> }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-drm-dp-mst-Fix-missing-ref-count-decrease.patch
Type: text/x-patch
Size: 1441 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20160209/531123a7/attachment.bin>
More information about the dri-devel
mailing list