Skip to content

Commit 1239150

Browse files
Jonathan Hamiltontoddpoynor
authored andcommitted
video: adf: Cleanup sw_sync timeline at adf_device_destroy
If a sw_sync timeline was created by ADF (for drivers that do not implement ops->complete_fence) we should clean it up when the ADF device is destroyed. Change-Id: Idd90180fcae56a87111f7d12bdd80190756a6b80 Signed-off-by: Jonathan Hamilton <jonathan.hamilton@imgtec.com>
1 parent d1e485f commit 1239150

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/video/adf/adf.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,11 @@ void adf_device_destroy(struct adf_device *dev)
615615
}
616616
mutex_destroy(&dev->post_lock);
617617
mutex_destroy(&dev->client_lock);
618-
adf_obj_destroy(&dev->base, NULL);
618+
619+
if (dev->timeline)
620+
sync_timeline_destroy(&dev->timeline->obj);
621+
622+
adf_obj_destroy(&dev->base, &adf_devices);
619623
}
620624
EXPORT_SYMBOL(adf_device_destroy);
621625

0 commit comments

Comments
 (0)