]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
iio: imu: inv_icm42600: Fix broken icm42600 (chip id 0 value)
authorJean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
Thu, 9 Jun 2022 10:23:01 +0000 (12:23 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 26 Aug 2022 08:53:57 +0000 (10:53 +0200)
commit991981f8c202cd60757ddaf8c8223c82094c000a
tree4fe6fb4ade2509e90618b469fad9ca2c7fe99e19
parenta965b769447d0e7143f4a9f4d50972c8f88c0872
iio: imu: inv_icm42600: Fix broken icm42600 (chip id 0 value)

BugLink: https://bugs.launchpad.net/bugs/1986718
commit 106b391e1b859100a3f38f0ad874236e9be06bde upstream.

The 0 value used for INV_CHIP_ICM42600 was not working since the
match in i2c/spi was checking against NULL value.

To keep this check, add a first INV_CHIP_INVALID 0 value as safe
guard.

Fixes: 31c24c1e93c3 ("iio: imu: inv_icm42600: add core of new inv_icm42600 driver")
Signed-off-by: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
Link: https://lore.kernel.org/r/20220609102301.4794-1-jmaneyrol@invensense.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/iio/imu/inv_icm42600/inv_icm42600.h
drivers/iio/imu/inv_icm42600/inv_icm42600_core.c