drm: of: Fix double-free bug
[sfrench/cifs-2.6.git] / drivers / gpu / drm / drm_of.c
index b50b44e7627975522b33b76f2d854c3fe2f3eb2f..8fc3f67e3e760e39e057fc7c2a7052d5408f287e 100644 (file)
@@ -322,10 +322,8 @@ static int drm_of_lvds_get_remote_pixels_type(
                 * configurations by passing the endpoints explicitly to
                 * drm_of_lvds_get_dual_link_pixel_order().
                 */
-               if (!current_pt || pixels_type != current_pt) {
-                       of_node_put(remote_port);
+               if (!current_pt || pixels_type != current_pt)
                        return -EINVAL;
-               }
        }
 
        return pixels_type;