Re: [PATCH 2/8] platform/x86: thinkpad_acpi: drop dead -ENXIO check in hotkey_init()
From: Mark Pearson
Date: Thu Nov 26 2026 - 21:46:57 EST
On Wed, Nov 25, 2026, at 6:11 PM, Dmitry Torokhov wrote:
> hotkey_mask_set() only ever returns 0 or -EIO, never -ENXIO. Simplify
> the error check on its return value in hotkey_init() accordingly.
>
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>
> ---
> drivers/platform/x86/lenovo/thinkpad_acpi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/platform/x86/lenovo/thinkpad_acpi.c
> b/drivers/platform/x86/lenovo/thinkpad_acpi.c
> index a586113ab1a7..659a2c5d1982 100644
> --- a/drivers/platform/x86/lenovo/thinkpad_acpi.c
> +++ b/drivers/platform/x86/lenovo/thinkpad_acpi.c
> @@ -3572,7 +3572,7 @@ static int __init hotkey_init(struct
> ibm_init_struct *iibm)
> | hotkey_driver_mask)
> & ~hotkey_source_mask);
> }
> - if (res < 0 && res != -ENXIO) {
> + if (res) {
> hotkey_exit();
> return res;
> }
>
> --
> 2.56.1.839.g22a8290db9-goog
Looks good to me.
Reviewed-by: Mark Pearson <mpearson-lenovo@xxxxxxxxx>
Mark