]> 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 11:51:05 +0000 (12:51 +0100)
commitafa9cd90e765e62b3dbb070e38b5788c692e39c1
treebbb5641dee46bebcbe86bf20095fbce71fbd4425
parent996340f3db89152270062e3e9de49175bffcadff
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