Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

speakup: fix uninitialized flush_lock

The flush_lock is uninitialized, use DEFINE_SPINLOCK
to define and initialize flush_lock.

Fixes: c6e3fd22cd53 ("Staging: add speakup to the staging directory")
Reported-by: Hulk Robot <hulkci@huawei.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20201117012229.3395186-1-yangyingliang@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Yang Yingliang and committed by
Greg Kroah-Hartman
d1b928ee 54bf54c8

+1 -1
+1 -1
drivers/accessibility/speakup/speakup_dectlk.c
··· 37 37 static int in_escape; 38 38 static int is_flushing; 39 39 40 - static spinlock_t flush_lock; 40 + static DEFINE_SPINLOCK(flush_lock); 41 41 static DECLARE_WAIT_QUEUE_HEAD(flush); 42 42 43 43 static struct var_t vars[] = {