mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-09 07:51:16 -04:00
staging: bcm2708_vchiq: fix return value check in vchiq_platform_conn_state_changed()
In case of error, the function kthread_create() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
cf8e732b54
commit
b04451d7df
@@ -2774,7 +2774,7 @@ void vchiq_platform_conn_state_changed(VCHIQ_STATE_T *state,
|
||||
&vchiq_keepalive_thread_func,
|
||||
(void *)state,
|
||||
threadname);
|
||||
if (arm_state->ka_thread == NULL) {
|
||||
if (IS_ERR(arm_state->ka_thread)) {
|
||||
vchiq_log_error(vchiq_susp_log_level,
|
||||
"vchiq: FATAL: couldn't create thread %s",
|
||||
threadname);
|
||||
|
||||
Reference in New Issue
Block a user