summaryrefslogtreecommitdiffstats
path: root/drivers/iio/imu
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-01-22 09:05:34 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-01-22 09:05:34 +0100
commitc318f074d9fdeae16e19cbb2ed53b50d2bcdfdb8 (patch)
tree44c6552fa919dfe1fc681949bf5d81fcf6a2beb8 /drivers/iio/imu
parent7b2d7faa09fcbd0184634544f732f4b2da0b20a8 (diff)
parentdef9d2780727cec3313ed3522d0123158d87224d (diff)
downloadlinux-c318f074d9fdeae16e19cbb2ed53b50d2bcdfdb8.tar.bz2
Merge 5.5-rc7 into staging-next
We want the staging fixes in here as well Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/iio/imu')
-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 345fdfc89ed1..84d219ae6aee 100644
--- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
+++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
@@ -1351,7 +1351,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)