From: Wei Yongjun Date: Mon, 17 Oct 2016 15:06:07 +0000 (+0000) Subject: staging: bcm2708_vchiq: fix return value check in vchiq_platform_conn_state_changed() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b04451d7dfac891daaab2eb88422839660560ba4;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c index ed388c41747b..a89375d56fa0 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -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);