| .. | .. |
|---|
| 77 | 77 | struct mali_internal_sync_fence_waiter *waiter; |
|---|
| 78 | 78 | #endif |
|---|
| 79 | 79 | struct mali_internal_sync_fence *sync_fence; |
|---|
| 80 | | - int ret; |
|---|
| 80 | + int ret = 0; |
|---|
| 81 | 81 | MALI_DEBUG_ASSERT_POINTER(cb); |
|---|
| 82 | 82 | MALI_IGNORE(fence); |
|---|
| 83 | 83 | #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0) |
|---|
| .. | .. |
|---|
| 92 | 92 | if (ret) |
|---|
| 93 | 93 | wake_up_all(&sync_fence->wq); |
|---|
| 94 | 94 | #else |
|---|
| 95 | | - ret = sync_fence->fence->ops->signaled(sync_fence->fence); |
|---|
| 95 | + if (!sync_fence) |
|---|
| 96 | + return; |
|---|
| 97 | + |
|---|
| 98 | + if ((sync_fence->fence) && (sync_fence->fence->ops) && (sync_fence->fence->ops->signaled)) |
|---|
| 99 | + ret = sync_fence->fence->ops->signaled(sync_fence->fence); |
|---|
| 96 | 100 | |
|---|
| 97 | 101 | if (0 > ret) |
|---|
| 98 | 102 | MALI_PRINT_ERROR(("Mali internal sync:Failed to wait fence 0x%x for sync_fence 0x%x.\n", fence, sync_fence)); |
|---|
| .. | .. |
|---|
| 682 | 686 | |
|---|
| 683 | 687 | |
|---|
| 684 | 688 | spin_lock_irqsave(fence->lock, flags); |
|---|
| 685 | | - if (WARN_ON_ONCE(!list_empty(&sync_pt->sync_pt_list))) |
|---|
| 689 | + if (!list_empty(&sync_pt->sync_pt_list)) |
|---|
| 686 | 690 | list_del(&sync_pt->sync_pt_list); |
|---|
| 687 | 691 | spin_unlock_irqrestore(fence->lock, flags); |
|---|
| 688 | 692 | |
|---|