Patch "rtw88: Fix an error code in rtw_debugfs_set_rsvd_page()" has been added to the 5.10-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

    rtw88: Fix an error code in rtw_debugfs_set_rsvd_page()

to the 5.10-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:
     rtw88-fix-an-error-code-in-rtw_debugfs_set_rsvd_page.patch
and it can be found in the queue-5.10 subdirectory.

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



commit 0f23290f045baddc74052726d52b3c85a6c8ef33
Author: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Date:   Mon Mar 15 12:23:37 2021 +0300

    rtw88: Fix an error code in rtw_debugfs_set_rsvd_page()
    
    [ Upstream commit c9eaee0c2ec6b1002044fb698cdfb5d9ef4ed28c ]
    
    The sscanf() function returns the number of matches (0 or 1 in this
    case).  It doesn't return error codes.  We should return -EINVAL if the
    string is invalid
    
    Fixes: c376c1fc87b7 ("rtw88: add h2c command in debugfs")
    Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
    Signed-off-by: Kalle Valo <kvalo@xxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/YE8nmatMDBDDWkjq@mwanda
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/wireless/realtek/rtw88/debug.c b/drivers/net/wireless/realtek/rtw88/debug.c
index efbba9caef3b..8bb6cc8ca74e 100644
--- a/drivers/net/wireless/realtek/rtw88/debug.c
+++ b/drivers/net/wireless/realtek/rtw88/debug.c
@@ -270,7 +270,7 @@ static ssize_t rtw_debugfs_set_rsvd_page(struct file *filp,
 
 	if (num != 2) {
 		rtw_warn(rtwdev, "invalid arguments\n");
-		return num;
+		return -EINVAL;
 	}
 
 	debugfs_priv->rsvd_page.page_offset = offset;



[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