rmi_sensor: Resolved RMI driver early suspend panic issue.
authorAsutosh Pathak <asutosh.pathak@intel.com>
Wed, 8 Feb 2012 02:36:17 +0000 (18:36 -0800)
committerbuildbot <buildbot@intel.com>
Wed, 15 Feb 2012 12:39:19 +0000 (04:39 -0800)
BZ: 22970

Fixing kernel panic due to "custom_ops" NULL pointer dereferencing in
rmi_sensor_suspend()

Signed-off-by: Asutosh Pathak <asutosh.pathak@intel.com>
Change-Id: Ia07ae63c26a20467c17987d0dd94b14a37f4ec92
Reviewed-on: http://android.intel.com:8080/34613
Reviewed-by: Pathak, Asutosh <asutosh.pathak@intel.com>
Reviewed-by: Du, Alek <alek.du@intel.com>
Tested-by: Wang, Zhifeng <zhifeng.wang@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
drivers/input/touchscreen/rmi/rmi_sensor.c

index 09917e6..71fe207 100644 (file)
@@ -623,7 +623,7 @@ static int rmi_sensor_suspend(struct device *dev, pm_message_t state)
        }
 
        /* apply customized settings */
-       if (custom_ops->rmi_sensor_custom_suspend)
+       if (custom_ops && custom_ops->rmi_sensor_custom_suspend)
                custom_ops->rmi_sensor_custom_suspend();
 
 exit: