mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
[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: Insu Yun <wuninsu@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
This commit is contained in:
parent
c574b75913
commit
bb07df8ae1
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue