Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Wei Yongjun and committed by
Greg Kroah-Hartman
b04451d7 cf8e732b

+1 -1
+1 -1
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
··· 2774 2774 &vchiq_keepalive_thread_func, 2775 2775 (void *)state, 2776 2776 threadname); 2777 - if (arm_state->ka_thread == NULL) { 2777 + if (IS_ERR(arm_state->ka_thread)) { 2778 2778 vchiq_log_error(vchiq_susp_log_level, 2779 2779 "vchiq: FATAL: couldn't create thread %s", 2780 2780 threadname);