Patch "drm/bridge: tc358768: Fix use of uninitialized variable" has been added to the 6.1-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

    drm/bridge: tc358768: Fix use of uninitialized variable

to the 6.1-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:
     drm-bridge-tc358768-fix-use-of-uninitialized-variabl.patch
and it can be found in the queue-6.1 subdirectory.

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



commit 813b2819b6f1b0970df30266fbbe9981523a2460
Author: Tomi Valkeinen <tomi.valkeinen@xxxxxxxxxxxxxxxx>
Date:   Wed Sep 6 09:50:49 2023 +0300

    drm/bridge: tc358768: Fix use of uninitialized variable
    
    [ Upstream commit a2d9036615f0adfa5b0a46bb2ce42ef1d9a04fbe ]
    
    smatch reports:
    
    drivers/gpu/drm/bridge/tc358768.c:223 tc358768_update_bits() error: uninitialized symbol 'orig'.
    
    Fix this by bailing out from tc358768_update_bits() if the
    tc358768_read() produces an error.
    
    Fixes: ff1ca6397b1d ("drm/bridge: Add tc358768 driver")
    Reviewed-by: Peter Ujfalusi <peter.ujfalusi@xxxxxxxxx>
    Tested-by: Maxim Schwalm <maxim.schwalm@xxxxxxxxx> # Asus TF700T
    Tested-by: Marcel Ziswiler <marcel.ziswiler@xxxxxxxxxxx>
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@xxxxxxxxxxxxxxxx>
    Signed-off-by: Robert Foss <rfoss@xxxxxxxxxx>
    Link: https://patchwork.freedesktop.org/patch/msgid/20230906-tc358768-v4-2-31725f008a50@xxxxxxxxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/bridge/tc358768.c b/drivers/gpu/drm/bridge/tc358768.c
index 2d0ac9987b58e..16aa849e992bd 100644
--- a/drivers/gpu/drm/bridge/tc358768.c
+++ b/drivers/gpu/drm/bridge/tc358768.c
@@ -217,6 +217,10 @@ static void tc358768_update_bits(struct tc358768_priv *priv, u32 reg, u32 mask,
 	u32 tmp, orig;
 
 	tc358768_read(priv, reg, &orig);
+
+	if (priv->error)
+		return;
+
 	tmp = orig & ~mask;
 	tmp |= val & mask;
 	if (tmp != orig)



[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