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 10:32:34 +0000 (11:32 +0100)
commit6272b17001e6fdcf7b4a16206287010a1523fa6e
tree86b44f75fcb537459c8fa870a3459495aa50d136
parentd877651afd60dcbbcdc31f9efded3c27813afd1a
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