Patch "thermal/drivers/tsens: Fix wrong check for tzd in irq handlers" has been added to the 5.14-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    thermal/drivers/tsens: Fix wrong check for tzd in irq handlers

to the 5.14-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     thermal-drivers-tsens-fix-wrong-check-for-tzd-in-irq.patch
and it can be found in the queue-5.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 376e97b79b09e554c9fe329a5886f30292368171
Author: Ansuel Smith <ansuelsmth@xxxxxxxxx>
Date:   Tue Sep 7 23:25:42 2021 +0200

    thermal/drivers/tsens: Fix wrong check for tzd in irq handlers
    
    [ Upstream commit cf96921876dcee4d6ac07b9de470368a075ba9ad ]
    
    Some devices can have some thermal sensors disabled from the
    factory. The current two irq handler functions check all the sensor by
    default and the check if the sensor was actually registered is
    wrong. The tzd is actually never set if the registration fails hence
    the IS_ERR check is wrong.
    
    Signed-off-by: Ansuel Smith <ansuelsmth@xxxxxxxxx>
    Reviewed-by: Matthias Kaehlcke <mka@xxxxxxxxxxxx>
    Signed-off-by: Daniel Lezcano <daniel.lezcano@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20210907212543.20220-1-ansuelsmth@xxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c
index 4c7ebd1d3f9c..b1162e566a70 100644
--- a/drivers/thermal/qcom/tsens.c
+++ b/drivers/thermal/qcom/tsens.c
@@ -417,7 +417,7 @@ static irqreturn_t tsens_critical_irq_thread(int irq, void *data)
 		const struct tsens_sensor *s = &priv->sensor[i];
 		u32 hw_id = s->hw_id;
 
-		if (IS_ERR(s->tzd))
+		if (!s->tzd)
 			continue;
 		if (!tsens_threshold_violated(priv, hw_id, &d))
 			continue;
@@ -467,7 +467,7 @@ static irqreturn_t tsens_irq_thread(int irq, void *data)
 		const struct tsens_sensor *s = &priv->sensor[i];
 		u32 hw_id = s->hw_id;
 
-		if (IS_ERR(s->tzd))
+		if (!s->tzd)
 			continue;
 		if (!tsens_threshold_violated(priv, hw_id, &d))
 			continue;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux