drm/dp-mst-helper: Avoid reading uninitialized value
authorDamien Lespiau <damien.lespiau@intel.com>
Mon, 14 Jul 2014 10:53:44 +0000 (11:53 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 18 Jul 2014 13:39:29 +0000 (15:39 +0200)
A static analysis tool tells me that we could try to read an
uninitialized 'ret' value. Plug that.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/drm_dp_mst_topology.c

index 369d6c49145b4c335b22b2531bb25cfdf4e27aa8..813b8d186691e86a2b6489e49c62e7ee81ab50bf 100644 (file)
@@ -1644,7 +1644,7 @@ int drm_dp_update_payload_part2(struct drm_dp_mst_topology_mgr *mgr)
 {
        struct drm_dp_mst_port *port;
        int i;
-       int ret;
+       int ret = 0;
        mutex_lock(&mgr->payload_lock);
        for (i = 0; i < mgr->max_payloads; i++) {