Commit 1b24e2f9 authored by Jean-Baptiste Maneyrol's avatar Jean-Baptiste Maneyrol Committed by Zheng Zengkai
Browse files

iio: imu: inv_icm42600: Fix broken icm42600 (chip id 0 value)

stable inclusion
from stable-v5.10.127
commit e3ebb9d16ce13772f0b094fbd5d02bef42da83e9
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5XDDK

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=e3ebb9d16ce13772f0b094fbd5d02bef42da83e9



--------------------------------

commit 106b391e 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: 31c24c1e ("iio: imu: inv_icm42600: add core of new inv_icm42600 driver")
Signed-off-by: default avatarJean-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: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
Reviewed-by: default avatarWei Li <liwei391@huawei.com>
parent 291092fb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment