Re: [PATCH] input: appletouch: initialize work before device registration

From: Dmitry Torokhov
Date: Fri Dec 31 2021 - 00:04:39 EST


On Thu, Dec 30, 2021 at 05:11:51PM +0300, Pavel Skripkin wrote:
> Syzbot has reported warning in __flush_work(). This warning is caused by
> work->func == NULL, which means missing work initialization.
>
> This may happen, since input_dev->close() calls cancel_work_sync(&dev->work),
> but dev->work initalization happens _after_ input_register_device()
> call.
>
> So this patch moves dev->work initialization before registering input
> device
>
> Fixes: 5a6eb676d3bc ("Input: appletouch - improve powersaving for Geyser3 devices")
> Reported-and-tested-by: syzbot+b88c5eae27386b252bbd@xxxxxxxxxxxxxxxxxxxxxxxxx
> Signed-off-by: Pavel Skripkin <paskripkin@xxxxxxxxx>

Applied, thank you.

--
Dmitry