From: Mark Yao Date: Tue, 10 May 2016 05:59:57 +0000 (+0800) Subject: drm/rockchip: vop: fix compile warning X-Git-Tag: firefly_0821_release~2671 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=cb794081c6ccffa0f87296052ae707542e88ca8e;p=firefly-linux-kernel-4.4.55.git drm/rockchip: vop: fix compile warning fix warning: warning: 'ret' may be used uninitialized in this function Change-Id: I743ed9788366322beeceddd556fae0c2a7cdd463 Signed-off-by: Mark Yao --- diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c index f720fd3fef13..544a51cfccb0 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c @@ -1345,7 +1345,8 @@ static int vop_create_crtc(struct vop *vop) win->type != DRM_PLANE_TYPE_CURSOR) continue; - if (vop_plane_init(vop, win, 0)) + ret = vop_plane_init(vop, win, 0); + if (ret) goto err_cleanup_planes; plane = &win->base; @@ -1374,7 +1375,8 @@ static int vop_create_crtc(struct vop *vop) if (win->type != DRM_PLANE_TYPE_OVERLAY) continue; - if (vop_plane_init(vop, win, possible_crtcs)) + ret = vop_plane_init(vop, win, possible_crtcs); + if (ret) goto err_cleanup_crtc; }