HID: Add null check for hidinput.
Add null check for hidinput before calling input_register. Change-Id: Ib3fc0507e4091192360f3395d13d489db9b5a4d2 Signed-off-by: Jaikumar Ganesh <jaikumarg@android.com>
This commit is contained in:
committed by
Colin Cross
parent
420359667c
commit
5c580171c6
@@ -1218,7 +1218,7 @@ int hidinput_connect(struct hid_device *hid, unsigned int force)
|
||||
goto out_unwind;
|
||||
}
|
||||
|
||||
if (hid->driver->input_register &&
|
||||
if (hidinput && hid->driver->input_register &&
|
||||
hid->driver->input_register(hid, hidinput))
|
||||
goto out_cleanup;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user