Commit b04451d7 authored by Wei Yongjun's avatar Wei Yongjun Committed by Greg Kroah-Hartman

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: default avatarWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent cf8e732b
...@@ -2774,7 +2774,7 @@ void vchiq_platform_conn_state_changed(VCHIQ_STATE_T *state, ...@@ -2774,7 +2774,7 @@ void vchiq_platform_conn_state_changed(VCHIQ_STATE_T *state,
&vchiq_keepalive_thread_func, &vchiq_keepalive_thread_func,
(void *)state, (void *)state,
threadname); threadname);
if (arm_state->ka_thread == NULL) { if (IS_ERR(arm_state->ka_thread)) {
vchiq_log_error(vchiq_susp_log_level, vchiq_log_error(vchiq_susp_log_level,
"vchiq: FATAL: couldn't create thread %s", "vchiq: FATAL: couldn't create thread %s",
threadname); threadname);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment