HID: Add null check for hidinput.
authorJaikumar Ganesh <jaikumarg@android.com>
Thu, 22 Sep 2011 00:18:56 +0000 (17:18 -0700)
committermgross <mark.gross@intel.com>
Wed, 9 Nov 2011 20:24:25 +0000 (12:24 -0800)
Add null check for hidinput before calling input_register.

Change-Id: Ib3fc0507e4091192360f3395d13d489db9b5a4d2
Signed-off-by: Jaikumar Ganesh <jaikumarg@android.com>
drivers/hid/hid-input.c

index 1b71bcd..1483c82 100644 (file)
@@ -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;