dect
/
linux-2.6
Archived
13
0
Fork 0

[PATCH] USB: hidinput_hid_event() oops fix

It seems that I see a bug in hidinput_hid_event.  The check for NULL can never
work, becaue &hidinput->input is nonzero at all times.

Cc: <vojtech@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Pete Zaitcev 2005-07-29 12:18:34 -07:00 committed by Linus Torvalds
parent 498f78e6fc
commit a9b2e9170b
1 changed files with 3 additions and 2 deletions

View File

@ -398,11 +398,12 @@ ignore:
void hidinput_hid_event(struct hid_device *hid, struct hid_field *field, struct hid_usage *usage, __s32 value, struct pt_regs *regs)
{
struct input_dev *input = &field->hidinput->input;
struct input_dev *input;
int *quirks = &hid->quirks;
if (!input)
if (!field->hidinput)
return;
input = &field->hidinput->input;
input_regs(input, regs);