Patch "phy: cadence-torrent: Check return value on register read" has been added to the 6.6-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

    phy: cadence-torrent: Check return value on register read

to the 6.6-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:
     phy-cadence-torrent-check-return-value-on-register-r.patch
and it can be found in the queue-6.6 subdirectory.

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



commit 6895a807fabe9511eaa41cb7565e7b45586cee93
Author: Ma Ke <make24@xxxxxxxxxxx>
Date:   Tue Jul 2 11:20:42 2024 +0800

    phy: cadence-torrent: Check return value on register read
    
    [ Upstream commit 967969cf594ed3c1678a9918d6e9bb2d1591cbe9 ]
    
    cdns_torrent_dp_set_power_state() does not consider that ret might be
    overwritten. Add return value check of regmap_read_poll_timeout() after
    register read in cdns_torrent_dp_set_power_state().
    
    Fixes: 5b16a790f18d ("phy: cadence-torrent: Reorder few functions to remove function declarations")
    Signed-off-by: Ma Ke <make24@xxxxxxxxxxx>
    Reviewed-by: Roger Quadros <rogerq@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20240702032042.3993031-1-make24@xxxxxxxxxxx
    Signed-off-by: Vinod Koul <vkoul@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/phy/cadence/phy-cadence-torrent.c b/drivers/phy/cadence/phy-cadence-torrent.c
index a75c96385c57a..a23d7f9b7d10f 100644
--- a/drivers/phy/cadence/phy-cadence-torrent.c
+++ b/drivers/phy/cadence/phy-cadence-torrent.c
@@ -1154,6 +1154,9 @@ static int cdns_torrent_dp_set_power_state(struct cdns_torrent_phy *cdns_phy,
 	ret = regmap_read_poll_timeout(regmap, PHY_PMA_XCVR_POWER_STATE_ACK,
 				       read_val, (read_val & mask) == value, 0,
 				       POLL_TIMEOUT_US);
+	if (ret)
+		return ret;
+
 	cdns_torrent_dp_write(regmap, PHY_PMA_XCVR_POWER_STATE_REQ, 0x00000000);
 	ndelay(100);
 




[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