]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
hwmon: (ad7314) Validate leading zero bits and return error
authorErik Schumacher <erik.schumacher@iris-sensing.com>
Mon, 24 Feb 2025 09:19:04 +0000 (09:19 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Mar 2025 12:02:05 +0000 (13:02 +0100)
commit596ababab7597ec8deab2c4a0f530cfbc88889cf
treef5bf44eca5697f6542d2130b49b4a504ef599d75
parent274e2692ec83e77c23f32184e01795134b63f0b4
hwmon: (ad7314) Validate leading zero bits and return error

[ Upstream commit e278d5e8aef4c0a1d9a9fa8b8910d713a89aa800 ]

Leading zero bits are sent on the bus before the temperature value is
transmitted. If any of these bits are high, the connection might be
unstable or there could be no AD7314 / ADT730x (or compatible) at all.
Return -EIO in that case.

Signed-off-by: Erik Schumacher <erik.schumacher@iris-sensing.com>
Fixes: 4f3a659581cab ("hwmon: AD7314 driver (ported from IIO)")
Link: https://lore.kernel.org/r/24a50c2981a318580aca8f50d23be7987b69ea00.camel@iris-sensing.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/hwmon/ad7314.c