Patch "usb: typec: Check for ops->exit instead of ops->enter in altmode_exit" has been added to the 4.19-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

    usb: typec: Check for ops->exit instead of ops->enter in altmode_exit

to the 4.19-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:
     usb-typec-check-for-ops-exit-instead-of-ops-enter-in.patch
and it can be found in the queue-4.19 subdirectory.

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



commit 347ef3171af98d554ea459201a658955fc262488
Author: Sven Peter <sven@xxxxxxxxxxxxx>
Date:   Mon Nov 14 17:59:24 2022 +0100

    usb: typec: Check for ops->exit instead of ops->enter in altmode_exit
    
    [ Upstream commit b6ddd180e3d9f92c1e482b3cdeec7dda086b1341 ]
    
    typec_altmode_exit checks if ops->enter is not NULL but then calls
    ops->exit a few lines below. Fix that and check for the function
    pointer it's about to call instead.
    
    Fixes: 8a37d87d72f0 ("usb: typec: Bus type for alternate modes")
    Signed-off-by: Sven Peter <sven@xxxxxxxxxxxxx>
    Reviewed-by: Heikki Krogerus <heikki.krogerus@xxxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20221114165924.33487-1-sven@xxxxxxxxxxxxx
    Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/usb/typec/bus.c b/drivers/usb/typec/bus.c
index 76299b6ff06d..7605963f71ed 100644
--- a/drivers/usb/typec/bus.c
+++ b/drivers/usb/typec/bus.c
@@ -126,7 +126,7 @@ int typec_altmode_exit(struct typec_altmode *adev)
 	if (!adev || !adev->active)
 		return 0;
 
-	if (!pdev->ops || !pdev->ops->enter)
+	if (!pdev->ops || !pdev->ops->exit)
 		return -EOPNOTSUPP;
 
 	/* Moving to USB Safe State */



[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