lkml.org 
[lkml]   [2020]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] speakup: fix uninitialized flush_lock
Yang Yingliang, le mar. 17 nov. 2020 09:22:29 +0800, a ecrit:
> 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>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>

Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>

> ---
> drivers/accessibility/speakup/speakup_dectlk.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/accessibility/speakup/speakup_dectlk.c b/drivers/accessibility/speakup/speakup_dectlk.c
> index 780214b5ca16..ab6d61e80b1c 100644
> --- a/drivers/accessibility/speakup/speakup_dectlk.c
> +++ b/drivers/accessibility/speakup/speakup_dectlk.c
> @@ -37,7 +37,7 @@ static unsigned char get_index(struct spk_synth *synth);
> static int in_escape;
> static int is_flushing;
>
> -static spinlock_t flush_lock;
> +static DEFINE_SPINLOCK(flush_lock);
> static DECLARE_WAIT_QUEUE_HEAD(flush);
>
> static struct var_t vars[] = {
> --
> 2.25.1
>

\
 
 \ /
  Last update: 2020-11-17 08:01    [W:0.044 / U:0.864 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site