From aefa4a4728c08f25ea9aaabeb7b92f3067cf8399 Mon Sep 17 00:00:00 2001 From: Randy Li Date: Tue, 17 Oct 2017 15:05:06 +0800 Subject: [PATCH] drm/rockchip: free memory in vop bandwidth interface The array won't be used again, it is quite safe to free it there. Change-Id: I3bc201fbdead819cc47a08848acd66797c82e0f5 Signed-off-by: Randy Li --- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c index 357c64905773..9371bea21ba1 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c @@ -1834,6 +1834,7 @@ static size_t vop_crtc_bandwidth(struct drm_crtc *crtc, sort(pbandwidth, cnt, sizeof(pbandwidth[0]), vop_bandwidth_cmp, NULL); bandwidth = vop_calc_max_bandwidth(pbandwidth, 0, cnt, vdisplay); + kfree(pbandwidth); /* * bandwidth(MB/s) * = line_bandwidth / line_time