File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
drivers/gpu/drm/i915/selftests Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -523,12 +523,19 @@ static void task_ipc(struct work_struct *work)
523523static int test_ipc (void * arg )
524524{
525525 struct task_ipc ipc ;
526+ struct workqueue_struct * wq ;
526527 int ret = 0 ;
527528
529+ wq = alloc_workqueue ("i1915-selftest" , 0 , 0 );
530+ if (wq == NULL )
531+ return - ENOMEM ;
532+
528533 /* Test use of i915_sw_fence as an interprocess signaling mechanism */
529534 ipc .in = alloc_fence ();
530- if (!ipc .in )
531- return - ENOMEM ;
535+ if (!ipc .in ) {
536+ ret = - ENOMEM ;
537+ goto err_work ;
538+ }
532539 ipc .out = alloc_fence ();
533540 if (!ipc .out ) {
534541 ret = - ENOMEM ;
@@ -540,7 +547,7 @@ static int test_ipc(void *arg)
540547
541548 ipc .value = 0 ;
542549 INIT_WORK_ONSTACK (& ipc .work , task_ipc );
543- schedule_work ( & ipc .work );
550+ queue_work ( wq , & ipc .work );
544551
545552 wait_for_completion (& ipc .started );
546553
@@ -563,6 +570,9 @@ static int test_ipc(void *arg)
563570 free_fence (ipc .out );
564571err_in :
565572 free_fence (ipc .in );
573+ err_work :
574+ destroy_workqueue (wq );
575+
566576 return ret ;
567577}
568578
You can’t perform that action at this time.
0 commit comments