Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bb07df8a authored by Insu Yun's avatar Insu Yun Committed by Mauro Carvalho Chehab
Browse files

[media] pvrusb2: correctly handling failed thread run



Since kthread_run returns -ENOMEM if failed,
it needs to be checked whether it is error, not whether it is null.

Signed-off-by: default avatarInsu Yun <wuninsu@gmail.com>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent c574b759
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -196,7 +196,7 @@ int pvr2_context_global_init(void)
	pvr2_context_thread_ptr = kthread_run(pvr2_context_thread_func,
					      NULL,
					      "pvrusb2-context");
	return (pvr2_context_thread_ptr ? 0 : -ENOMEM);
	return IS_ERR(pvr2_context_thread_ptr) ? -ENOMEM : 0;
}