drm: Don't initialize local ret variable when not needed
[deliverable/linux.git] / drivers / gpu / drm / drm_fb_helper.c
index 6e19dd156be023f8a060b523d2db1f824dde8ea4..9b773d51cff502780ec31911d6569ff08f5e4b50 100644 (file)
@@ -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;
        }
 
This page took 0.032301 seconds and 5 git commands to generate.