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>
}
/* 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: