The static quirk list uses idVendor == 0 to mark the end of
hid_blacklist[], so we don't expect any device to have idVendor == 0. If
a device is correctly presenting with idVendor == 0, we need a different
way to terminate that blacklist. Either that or there's an upper-layer
bug, as you write.
Regarding its placement: that WARN_ON() belongs in the static quirk lookup
code, rather than where it is now. Its current location must be a relic
of an earlier patchset.
No. There shouldn't be any functional problem with removing that
WARN_ON(), and also removing the initial if() in usbhid_lookup_dquirk().
- Paul
-