mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
thermal: armada: fix legacy validity test sense
[ Upstream commit70bb27b79a] Commit8c0e64ac40("thermal: armada: get rid of the ->is_valid() pointer") removed the unnecessary indirection through a function pointer, but in doing so, also removed the negation operator too: - if (priv->data->is_valid && !priv->data->is_valid(priv)) { + if (armada_is_valid(priv)) { which results in: armada_thermal f06f808c.thermal: Temperature sensor reading not valid armada_thermal f2400078.thermal: Temperature sensor reading not valid armada_thermal f4400078.thermal: Temperature sensor reading not valid at boot, or whenever the "temp" sysfs file is read. Replace the negation operator. Fixes:8c0e64ac40("thermal: armada: get rid of the ->is_valid() pointer") Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by: Eduardo Valentin <edubezval@gmail.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
4c2efd8cf5
commit
42d040e2c7
@@ -357,7 +357,7 @@ static int armada_get_temp_legacy(struct thermal_zone_device *thermal,
|
||||
int ret;
|
||||
|
||||
/* Valid check */
|
||||
if (armada_is_valid(priv)) {
|
||||
if (!armada_is_valid(priv)) {
|
||||
dev_err(priv->dev,
|
||||
"Temperature sensor reading not valid\n");
|
||||
return -EIO;
|
||||
|
||||
Reference in New Issue
Block a user