HID: bigbenff: prevent null pointer dereference
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>
Thu, 2 Dec 2021 09:53:32 +0000 (10:53 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Dec 2021 09:57:06 +0000 (10:57 +0100)
commit58f15f5ae7786c824868f3a7e093859b74669ce7
tree09eb6c0a30c37a91d02291dd7863a9ecd009cb09
parent30d3150d909431fd7424ab8ff4c4c2c795554e30
HID: bigbenff: prevent null pointer dereference

commit 918aa1ef104d286d16b9e7ef139a463ac7a296f0 upstream.

When emulating the device through uhid, there is a chance we don't have
output reports and so report_field is null.

Cc: stable@vger.kernel.org
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20211202095334.14399-3-benjamin.tissoires@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hid/hid-bigbenff.c