drm/omap: fix leak & crash in omap_gem_op_sync()
[android-sdk/kernel-video.git] / drivers / gpu / drm / omapdrm / omap_gem.c
index c196c75c9d2b80d6ca81980e0933edf187f9ceee..afb7f93a39adcecf1204c79da07982e685910de9 100644 (file)
@@ -1205,18 +1205,9 @@ int omap_gem_op_sync(struct drm_gem_object *obj, enum omap_gem_op op)
                        SYNC("waited: %p", waiter);
                        list_add_tail(&waiter->list, &waiters);
                        spin_unlock(&sync_lock);
                        SYNC("waited: %p", waiter);
                        list_add_tail(&waiter->list, &waiters);
                        spin_unlock(&sync_lock);
-                       ret = wait_event_interruptible(sync_event,
-                                       (waiter_task == NULL));
+                       wait_event(sync_event, (waiter_task == NULL));
                        spin_lock(&sync_lock);
                        spin_lock(&sync_lock);
-                       if (waiter_task) {
-                               SYNC("interrupted: %p", waiter);
-                               /* we were interrupted */
-                               list_del(&waiter->list);
-                               waiter_task = NULL;
-                       } else {
-                               /* freed in sync_op_update() */
-                               waiter = NULL;
-                       }
+                       waiter = NULL;
                }
                spin_unlock(&sync_lock);
 
                }
                spin_unlock(&sync_lock);