* [PATCH -next] staging: bcm2708_vchiq: fix return value check in vchiq_platform_conn_state_changed()
@ 2016-10-17 15:06 Wei Yongjun
0 siblings, 0 replies; only message in thread
From: Wei Yongjun @ 2016-10-17 15:06 UTC (permalink / raw)
To: gregkh, daniels, noralf, popcornmix, bobby.prani
Cc: Wei Yongjun, devel, linux-kernel
From: Wei Yongjun <weiyongjun1@huawei.com>
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>
---
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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 e11c0e0..ccd1735 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
@@ -2781,7 +2781,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);
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2016-10-17 15:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-17 15:06 [PATCH -next] staging: bcm2708_vchiq: fix return value check in vchiq_platform_conn_state_changed() Wei Yongjun
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.