# Re: \[PATCH 05/12\] HID: wiimote: Synchronize wiimote input and hid event handling

- From: Jiri Kosina \<hidden\>
- Date: 2011-07-11 12:29:26 
- List: linux-input
- Page: https://ratatoskr.run/linux-input/2011/07/8917225
- Thread: https://ratatoskr.run/linux-input/2011/06/8917072/t.md

```text
On Wed, 29 Jun 2011, David Herrmann wrote:

> But, thanks to your hint, I looked at hid_hw_start() again and as far
> as I can see the synchronization issue exists there, too.
> The ll_driver->start() function is called first and after that, the
> input instance is registered.
> If the ll_driver reports an event before the input instance is
> registered, the hidinput/other-driver will call input_event() on an
> invalid input instance (probably even a NULL dereference).
> This may not be a problem for usbhid, because usbhid_open() has to be
> called first, however, hidp (bluetooth hid) ignores the *_open()
> callback and therefore may fail.

Indeed, this looks like a proper analysis. Thanks a lot for looking into 
it.

Are you planning on submitting the fix for that? Otherwise I'll add it to 
my TODO list, independently on the wiimote driver.

Thanks,

-- 
Jiri Kosina
SUSE Labs
```
