From: Jaikumar Ganesh Date: Thu, 22 Sep 2011 00:18:56 +0000 (-0700) Subject: HID: Add null check for hidinput. X-Git-Tag: firefly_0821_release~7613^2~291 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6c6f91c5330263a0be0ad99a84755c342b395d49;p=firefly-linux-kernel-4.4.55.git HID: Add null check for hidinput. Add null check for hidinput before calling input_register. Change-Id: Ib3fc0507e4091192360f3395d13d489db9b5a4d2 Signed-off-by: Jaikumar Ganesh --- diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index 1b71bcd7ba21..1483c8296d57 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c @@ -981,7 +981,7 @@ int hidinput_connect(struct hid_device *hid, unsigned int force) } } - if (hid->driver->input_register && + if (hidinput && hid->driver->input_register && hid->driver->input_register(hid, hidinput)) goto out_cleanup;