diff options
| author | Hans de Goede <hdegoede@redhat.com> | 2021-11-21 20:11:24 +0100 |
|---|---|---|
| committer | Hans de Goede <hdegoede@redhat.com> | 2021-11-25 16:18:21 +0100 |
| commit | c7e1c782f2432cd4dc6c6ea930d99d93997a0edb (patch) | |
| tree | a10593374d72b184bc1e15fb8b5e34734056456d /tools/perf/scripts/python/export-to-sqlite.py | |
| parent | platform/x86: thinkpad_acpi: Accept ibm_init_struct.init() returning -ENODEV (diff) | |
| download | linux-c7e1c782f2432cd4dc6c6ea930d99d93997a0edb.tar.gz linux-c7e1c782f2432cd4dc6c6ea930d99d93997a0edb.zip | |
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: Andy Shevchenko <andy.shevchenko@gmail.com>
Tested-by: Mark Pearson <mpearson@lenovo.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20211121191129.256713-3-hdegoede@redhat.com
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions
