In the Linux kernel, the following vulnerability has been resolved:
Input: appletouch - initialize work before device registration
Syzbot has reported warning in _flushwork(). This warning is caused by work->func == NULL, which means missing work initialization.
This may happen, since inputdev->close() calls cancelworksync(&dev->work), but dev->work initalization happens _after inputregisterdevice() call.
So this patch moves dev->work initialization before registering input device