aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2020-01-20 08:43:44 +0100
committerIngo Molnar <mingo@kernel.org>2020-01-20 08:43:44 +0100
commitcb6c82df684e912b10245c13200ef09c9d372fc2 (patch)
tree98448cea990ecf17ad39798980ab18165b72b7ac /drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
parentperf/x86/amd: Add support for Large Increment per Cycle Events (diff)
parentLinux 5.5-rc7 (diff)
downloadlinux-dev-cb6c82df684e912b10245c13200ef09c9d372fc2.tar.xz
linux-dev-cb6c82df684e912b10245c13200ef09c9d372fc2.zip
Merge tag 'v5.5-rc7' into perf/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c')
-rw-r--r--drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
index a7d40c02ce6b..b921dd9e108f 100644
--- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
+++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
@@ -1301,7 +1301,8 @@ static int st_lsm6dsx_check_whoami(struct st_lsm6dsx_hw *hw, int id,
for (i = 0; i < ARRAY_SIZE(st_lsm6dsx_sensor_settings); i++) {
for (j = 0; j < ST_LSM6DSX_MAX_ID; j++) {
- if (id == st_lsm6dsx_sensor_settings[i].id[j].hw_id)
+ if (st_lsm6dsx_sensor_settings[i].id[j].name &&
+ id == st_lsm6dsx_sensor_settings[i].id[j].hw_id)
break;
}
if (j < ST_LSM6DSX_MAX_ID)