iio: imu: st_lsm6dsx: always check enable_reg in st_lsm6dsx_event_setup
Check if enable_reg of event_settings data structure is defined before writing on it Fixes: b5969abf ("iio: imu: st_lsm6dsx: add motion events") Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Tested-by: Sean Nyekjaer <sean@geanix.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Showing
Please register or sign in to comment