HID: core: save one kmemdup during .probe()
authorBenjamin Tissoires <bentiss@kernel.org>
Tue, 1 Oct 2024 14:30:06 +0000 (16:30 +0200)
committerBenjamin Tissoires <bentiss@kernel.org>
Fri, 4 Oct 2024 14:10:35 +0000 (16:10 +0200)
commit52cd1906ef6b93d638a78a34765c38c7edadd2ff
tree6d4b6ad6c7a1a22b5583fc057ab63ed8312393a1
parent8b7fd6a15f8c32760c2026a62dcf55219b4da15b
HID: core: save one kmemdup during .probe()

Turns out the first kmemdup is only required for the .report_fixup()
driver callback. There is no need to do two kmemdup() in a row in case
.report_fixup() is not present.

Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Link: https://patch.msgid.link/20241001-hid-bpf-hid-generic-v3-2-2ef1019468df@kernel.org
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
drivers/hid/hid-core.c