drm: Don't initialize local ret variable when not needed
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:

committed by
Dave Airlie

parent
7eb3b2c83d
commit
4a1b071427
@@ -383,7 +383,6 @@ int drm_fb_helper_init(struct drm_device *dev,
|
||||
int crtc_count, int max_conn_count)
|
||||
{
|
||||
struct drm_crtc *crtc;
|
||||
int ret = 0;
|
||||
int i;
|
||||
|
||||
fb_helper->dev = dev;
|
||||
@@ -408,10 +407,8 @@ int drm_fb_helper_init(struct drm_device *dev,
|
||||
sizeof(struct drm_connector *),
|
||||
GFP_KERNEL);
|
||||
|
||||
if (!fb_helper->crtc_info[i].mode_set.connectors) {
|
||||
ret = -ENOMEM;
|
||||
if (!fb_helper->crtc_info[i].mode_set.connectors)
|
||||
goto out_free;
|
||||
}
|
||||
fb_helper->crtc_info[i].mode_set.num_connectors = 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user