Patch "crypto: sa2ul - Fix pm_runtime_get_sync() error checking" has been added to the 5.9-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

    crypto: sa2ul - Fix pm_runtime_get_sync() error checking

to the 5.9-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:
     crypto-sa2ul-fix-pm_runtime_get_sync-error-checking.patch
and it can be found in the queue-5.9 subdirectory.

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



commit c879f67f96d3858db7ae03e4c20214123c730a8f
Author: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Date:   Wed Sep 9 12:45:28 2020 +0300

    crypto: sa2ul - Fix pm_runtime_get_sync() error checking
    
    [ Upstream commit 2baace5feb86c6916221911f391f11fcd8e1a259 ]
    
    The pm_runtime_get_sync() function returns either 0 or 1 on success but
    this code treats a return of 1 as a failure.
    
    Fixes: 7694b6ca649f ("crypto: sa2ul - Add crypto driver")
    Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
    Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/crypto/sa2ul.c b/drivers/crypto/sa2ul.c
index ff8bbdb4d235d..039579b7cc818 100644
--- a/drivers/crypto/sa2ul.c
+++ b/drivers/crypto/sa2ul.c
@@ -2331,7 +2331,7 @@ static int sa_ul_probe(struct platform_device *pdev)
 
 	pm_runtime_enable(dev);
 	ret = pm_runtime_get_sync(dev);
-	if (ret) {
+	if (ret < 0) {
 		dev_err(&pdev->dev, "%s: failed to get sync: %d\n", __func__,
 			ret);
 		return ret;



[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