Просмотр исходного кода

qcacmn: Check create thread return value in scheduler

Check for NULL in scheduler create thread return value

Change-Id: I00b1e58115eb70ba0074bb8e147445cf43296a66
Chaitanya Kiran Godavarthi 6 лет назад
Родитель
Сommit
1f55ed1a9f
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      scheduler/src/scheduler_api.c

+ 2 - 2
scheduler/src/scheduler_api.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-2019 The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -99,7 +99,7 @@ QDF_STATUS scheduler_enable(void)
 	/* create the scheduler thread */
 	sched_ctx->sch_thread = qdf_create_thread(scheduler_thread, sched_ctx,
 						  "scheduler_thread");
-	if (IS_ERR(sched_ctx->sch_thread)) {
+	if (!sched_ctx->sch_thread) {
 		sched_err("Failed to create scheduler thread");
 		return QDF_STATUS_E_RESOURCES;
 	}