projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c574b75
)
[media] pvrusb2: correctly handling failed thread run
author
Insu Yun
<
[email protected]
>
Thu, 4 Feb 2016 23:09:23 +0000
(21:09 -0200)
committer
Mauro Carvalho Chehab
<
[email protected]
>
Fri, 19 Feb 2016 10:10:32 +0000
(08:10 -0200)
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 <
[email protected]
>
Signed-off-by: Hans Verkuil <
[email protected]
>
Signed-off-by: Mauro Carvalho Chehab <
[email protected]
>
drivers/media/usb/pvrusb2/pvrusb2-context.c
patch
|
blob
|
history
diff --git
a/drivers/media/usb/pvrusb2/pvrusb2-context.c
b/drivers/media/usb/pvrusb2/pvrusb2-context.c
index fd888a604462a02d96b1b44bf3ecd9b7cb68a805..c45f30715dcd019217d9ae51a22f1f8874c96d10 100644
(file)
--- a/
drivers/media/usb/pvrusb2/pvrusb2-context.c
+++ b/
drivers/media/usb/pvrusb2/pvrusb2-context.c
@@
-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
;
}