sched: deadline: Remove unnecessary ‘NULL’ values from p

Message ID 20230606202310.3039-1-kunyu@nfschina.com
State New
Headers
Series sched: deadline: Remove unnecessary ‘NULL’ values from p |

Commit Message

Li kunyu June 6, 2023, 8:23 p.m. UTC
  p is assigned first, so it does not need to initialize the assignment.

Signed-off-by: Li kunyu <kunyu@nfschina.com>
---
 kernel/sched/deadline.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index b94a498f8cd9..cbb13a23a5f9 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -2104,7 +2104,7 @@  static int pick_dl_task(struct rq *rq, struct task_struct *p, int cpu)
  */
 static struct task_struct *pick_earliest_pushable_dl_task(struct rq *rq, int cpu)
 {
-	struct task_struct *p = NULL;
+	struct task_struct *p;
 	struct rb_node *next_node;
 
 	if (!has_pushable_dl_tasks(rq))