linux/drivers/platform/x86
Barnabás Pőcze 413b18866b platform/x86: huawei-wmi: fix return value calculation
[ Upstream commit 0b9a1dcdb6 ]

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: 1ac9abeb2e ("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>
2022-12-31 13:14:02 +01:00
..
dell platform/x86: dell-wmi-descriptor: disable by default 2021-12-08 09:04:38 +01:00
intel platform/x86/intel/hid: Add some ACPI device IDs 2022-12-02 17:41:01 +01:00
acer-wireless.c
acer-wmi.c platform/x86: acer-wmi: Enable SW_TABLET_MODE on Switch V 10 (SW5-017) 2022-12-02 17:41:10 +01:00
acerhdf.c thermal/core: Remove ms based delay fields 2021-01-19 22:23:49 +01:00
adv_swbutton.c platform/x86: add support for Advantech software defined button 2021-04-07 19:46:56 +02:00
amd-pmc.c platform/x86: amd-pmc: only use callbacks for suspend 2021-12-29 12:28:54 +01:00
amilo-rfkill.c
apple-gmux.c platform/x86: apple-gmux: use resource_size() with res 2022-01-05 12:42:33 +01:00
asus-laptop.c platform/x86: asus-laptop: fix kobj_to_dev.cocci warnings 2021-03-23 21:06:10 +01:00
asus-nb-wmi.c platform/x86: asus-nb-wmi: Add tablet_mode_sw=lid-flip quirk for the TP200s 2021-08-12 17:18:28 +02:00
asus-wireless.c
asus-wmi.c platform/x86: asus-wmi: add missing pci_dev_put() in asus_wmi_set_xusb2pr() 2022-12-02 17:41:10 +01:00
asus-wmi.h
classmate-laptop.c platform/x86: Typo fix in the file classmate-laptop.c 2021-03-23 21:05:58 +01:00
compal-laptop.c
dual_accel_detect.h platform/x86: dual_accel_detect: Use the new i2c_acpi_client_count() helper 2021-08-12 17:26:36 +02:00
eeepc-laptop.c
eeepc-wmi.c
firmware_attributes_class.c platform/x86: dell-wmi-sysman: fw_attr_inuse can be static 2021-06-16 17:47:52 +02:00
firmware_attributes_class.h platform/x86: firmware_attributes_class: Create helper file for handling firmware-attributes class registration events 2021-06-16 17:47:51 +02:00
fujitsu-laptop.c
fujitsu-tablet.c
gigabyte-wmi.c platform/x86: gigabyte-wmi: Add support for B450M DS3H-CF 2022-06-22 14:21:59 +02:00
gpd-pocket-fan.c platform/x86: gpd pocket fan: Clean-up by using managed work init 2021-03-23 15:22:40 +01:00
hdaps.c platform/x86: hdaps: Constify static attribute_group struct 2021-06-16 17:47:54 +02:00
hp_accel.c platform/x86: hp_accel: Fix an error handling path in 'lis3lv02d_probe()' 2021-11-25 09:48:37 +01:00
hp-wmi.c platform/x86: hp-wmi: Ignore Smart Experience App event 2022-12-02 17:41:10 +01:00
huawei-wmi.c platform/x86: huawei-wmi: fix return value calculation 2022-12-31 13:14:02 +01:00
i2c-multi-instantiate.c platform/x86: i2c-multi-instantiate: Use the new i2c_acpi_client_count() helper 2021-08-12 17:26:36 +02:00
ibm_rtl.c
ideapad-laptop.c platform/x86: ideapad-laptop: Fix interrupt storm on fn-lock toggle on some Yoga laptops 2022-12-02 17:41:11 +01:00
intel_ips.c platform/x86: intel_ips: fix set but unused warning in read_mgtv 2021-06-16 17:47:55 +02:00
intel_ips.h
intel_scu_ipc.c platform/x86: intel_scu_ipc: Update timeout value in comment 2021-10-11 15:34:51 +02:00
intel_scu_ipcutil.c
intel_scu_pcidrv.c sfi: Remove framework for deprecated firmware 2021-02-15 20:09:46 +01:00
intel_scu_pltdrv.c
intel_scu_wdt.c platform/x86: intel_scu_wdt: Drop mistakenly added const 2021-02-05 12:54:27 +02:00
Kconfig platform/x86: panasonic-laptop: filter out duplicate volume up/down/mute keypresses 2022-07-07 17:53:34 +02:00
lg-laptop.c lg-laptop: Correctly handle dmi_get_system_info() returning NULL 2021-09-13 10:38:52 +02:00
Makefile platform/x86/intel: Remove X86_PLATFORM_DRIVERS_INTEL 2021-12-29 12:28:49 +01:00
meraki-mx100.c platform/x86: add meraki-mx100 platform driver 2021-08-12 09:26:28 +02:00
mlx-platform.c
msi-laptop.c platform/x86: msi-laptop: Change DMI match / alias strings to fix module autoloading 2022-10-26 12:35:40 +02:00
msi-wmi.c platform/x86: msi-wmi: Fix variable 'status' set but not used compiler warning 2021-02-04 13:35:20 +01:00
mxm-wmi.c
panasonic-laptop.c platform/x86: panasonic-laptop: filter out duplicate volume up/down/mute keypresses 2022-07-07 17:53:34 +02:00
pcengines-apuv2.c platform/x86: pcengines-apuv2: Add missing terminating entries to gpio-lookup tables 2021-08-06 14:04:43 +02:00
peaq-wmi.c
pmc_atom.c platform/x86: pmc_atom: Fix SLP_TYPx bitfield mask 2022-09-08 12:28:01 +02:00
samsung-laptop.c platform/x86: samsung-laptop: Fix an unsigned comparison which can never be negative 2022-04-27 14:38:55 +02:00
samsung-q10.c
sony-laptop.c
system76_acpi.c
tc1100-wmi.c platform/x86: tc1100-wmi: Constify static attribute_group struct 2021-06-16 17:47:54 +02:00
think-lmi.c platform/x86: think-lmi: Abort probe on analyze failure 2021-11-25 09:48:37 +01:00
think-lmi.h platform/x86: think-lmi: Abort probe on analyze failure 2021-11-25 09:48:37 +01:00
thinkpad_acpi.c platform/x86: thinkpad_acpi: Fix WWAN device disabled issue after S3 deep 2021-12-08 09:04:38 +01:00
topstar-laptop.c
toshiba_acpi.c platform/x86: toshiba_acpi: Fix missing error code in toshiba_acpi_setup_keyboard() 2021-06-16 17:47:51 +02:00
toshiba_bluetooth.c
toshiba_haps.c platform/x86: toshiba_haps: Fix missing newline in pr_debug call in toshiba_haps_notify 2021-06-16 17:47:49 +02:00
toshiba-wmi.c
touchscreen_dmi.c platform/x86: touchscreen_dmi: Add info for the RCA Cambio W101 v2 2-in-1 2022-12-02 17:41:01 +01:00
uv_sysfs.c x86/platform/uv: Constify static attribute_group struct 2021-06-16 17:47:55 +02:00
wireless-hotkey.c platform/x86: wireless-hotkey: remove hardcoded "hp" from the error message 2021-07-14 22:32:26 +02:00
wmi-bmof.c platform/x86: wmi: Make remove callback return void 2021-03-08 11:33:39 +01:00
wmi.c platform/x86: wmi: Fix driver->notify() vs ->probe() race 2022-07-12 16:34:53 +02:00
xiaomi-wmi.c
xo1-rfkill.c
xo15-ebook.c platform: x86: ACPI: Get rid of ACPICA message printing 2021-03-08 11:33:39 +01:00