clocksource: Initialize cs->wd_list
authorPeter Zijlstra <peterz@infradead.org>
Mon, 30 Apr 2018 10:00:11 +0000 (12:00 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 2 May 2018 14:10:40 +0000 (16:10 +0200)
commit5b9e886a4af97574ca3ce1147f35545da0e7afc7
treef21241809c135be8938c5d562b8b0c30d5a40042
parent2aae7bcfa4104b770e6f612356adb8d66c6144d6
clocksource: Initialize cs->wd_list

A number of places relies on list_empty(&cs->wd_list), however the
list_head does not get initialized. Do so upon registration, such that
thereafter it is possible to rely on list_empty() correctly reflecting
the list membership status.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Diego Viola <diego.viola@gmail.com>
Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: stable@vger.kernel.org
Cc: len.brown@intel.com
Cc: rjw@rjwysocki.net
Cc: rui.zhang@intel.com
Link: https://lkml.kernel.org/r/20180430100344.472662715@infradead.org
kernel/time/clocksource.c