提交 bb07df8a 编写于 作者: I Insu Yun 提交者: Mauro Carvalho Chehab

[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: NInsu Yun <wuninsu@gmail.com>
Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
上级 c574b759
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册