Patch "ACPI: EC: Avoid returning AE_OK on errors in address space handler" has been added to the 5.15-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

    ACPI: EC: Avoid returning AE_OK on errors in address space handler

to the 5.15-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:
     acpi-ec-avoid-returning-ae_ok-on-errors-in-address-s.patch
and it can be found in the queue-5.15 subdirectory.

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



commit 3951f873c3bea5c04cba6f34cc02e3aba914ffa9
Author: Armin Wolf <W_Armin@xxxxxx>
Date:   Wed May 22 23:36:49 2024 +0200

    ACPI: EC: Avoid returning AE_OK on errors in address space handler
    
    [ Upstream commit c4bd7f1d78340e63de4d073fd3dbe5391e2996e5 ]
    
    If an error code other than EINVAL, ENODEV or ETIME is returned
    by acpi_ec_read() / acpi_ec_write(), then AE_OK is incorrectly
    returned by acpi_ec_space_handler().
    
    Fix this by only returning AE_OK on success, and return AE_ERROR
    otherwise.
    
    Signed-off-by: Armin Wolf <W_Armin@xxxxxx>
    [ rjw: Subject and changelog edits ]
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 1896ec78e88c7..59e617ab12a51 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -1321,8 +1321,10 @@ acpi_ec_space_handler(u32 function, acpi_physical_address address,
 		return AE_NOT_FOUND;
 	case -ETIME:
 		return AE_TIME;
-	default:
+	case 0:
 		return AE_OK;
+	default:
+		return AE_ERROR;
 	}
 }
 




[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