Skip to content
Commit c7e1c782 authored by Hans de Goede's avatar Hans de Goede
Browse files

platform/x86: thinkpad_acpi: Make *_init() functions return -ENODEV instead of 1



Make ibm_init_struct.init() callbacks return -ENODEV instead of 1 when
the subdevice / function is not available.

Using -ENODEV clearly states what it going on where as a magic return of
"1" requires a deep dive into the code to figure out what is going on.

This also allows for some cleanups, avoiding the need to translate an
-ENODEV return into "return 1" (which often mistakenly was "return 0").

Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Tested-by: default avatarMark Pearson <mpearson@lenovo.com>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20211121191129.256713-3-hdegoede@redhat.com
parent c15f8685
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment