Upon returning valid error code on atomic_ioctl failure, changes have been done to goto error/out in cases of error instead of returining to accommodate returning the failure codes. As part of this change complete_signaling() will be called as part of cleanup. Check if the fences are initialied/prepared before completing.
Signed-off-by: Arun R Murthy <[email protected]> --- drivers/gpu/drm/drm_atomic_uapi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c index 3042e6c2616fb09403c13a8630c8819a39cf55d4..dacdfc2f706a88e93cab924fb988c762906047da 100644 --- a/drivers/gpu/drm/drm_atomic_uapi.c +++ b/drivers/gpu/drm/drm_atomic_uapi.c @@ -1569,7 +1569,7 @@ int drm_mode_atomic_ioctl(struct drm_device *dev, struct drm_modeset_acquire_ctx ctx; struct drm_out_fence_state *fence_state; int ret = 0; - unsigned int i, j, num_fences; + unsigned int i, j, num_fences = 0; bool async_flip = false; /* disallow for drivers not supporting atomic: */ @@ -1727,7 +1727,8 @@ int drm_mode_atomic_ioctl(struct drm_device *dev, return -EFAULT; } - complete_signaling(dev, state, fence_state, num_fences, !ret); + if (num_fences) + complete_signaling(dev, state, fence_state, num_fences, !ret); if (ret == -EDEADLK) { drm_atomic_state_clear(state); -- 2.25.1
