diff options
author | Barnabás Pőcze | 2022-10-05 15:00:45 +0000 |
---|---|---|
committer | Greg Kroah-Hartman | 2022-12-31 13:31:56 +0100 |
commit | 790c52369e5dab00f51dfed0d4a4ba8c0b3bf1ba (patch) | |
tree | 06913b397ad6681f02c28e232a70575e69ecc8e5 /include/linux | |
parent | 51b2ea9e4e53abc55cd7f2ce4fa6a3bd05030297 (diff) |
platform/x86: huawei-wmi: fix return value calculation
[ Upstream commit 0b9a1dcdb6a2c841899389bf2dd7a3e0e2aa0e99 ]
Previously, `huawei_wmi_input_setup()` returned the result of
logical or-ing the return values of two functions that return negative
errno-style error codes and one that returns `acpi_status`. If this
returned value was non-zero, then it was propagated from the platform
driver's probe function. That function should return a negative
errno-style error code, so the result of the logical or that
`huawei_wmi_input_setup()` returned was not appropriate.
Fix that by checking each function separately and returning the
error code unmodified.
Fixes: 1ac9abeb2e5b ("platform/x86: huawei-wmi: Move to platform driver")
Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com>
Link: https://lore.kernel.org/r/20221005150032.173198-2-pobrn@protonmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions