Skip to content

Commit aa44afa

Browse files
mrhpearsonjwrdegoede
authored andcommitted
platform/x86: thinkpad_acpi: correct palmsensor error checking
The previous commit adding functionality for the palm sensor had a mistake which meant the error conditions on initialisation was not checked correctly. On some older platforms this meant that if the sensor wasn't available an error would be returned and the driver would fail to load. This commit corrects the error condition. Many thanks to Mario Oenning for reporting and determining the issue Signed-off-by: Mark Pearson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Hans de Goede <[email protected]>
1 parent fcd38f1 commit aa44afa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/platform/x86/thinkpad_acpi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9951,9 +9951,9 @@ static int tpacpi_proxsensor_init(struct ibm_init_struct *iibm)
99519951
if ((palm_err == -ENODEV) && (lap_err == -ENODEV))
99529952
return 0;
99539953
/* Otherwise, if there was an error return it */
9954-
if (palm_err && (palm_err != ENODEV))
9954+
if (palm_err && (palm_err != -ENODEV))
99559955
return palm_err;
9956-
if (lap_err && (lap_err != ENODEV))
9956+
if (lap_err && (lap_err != -ENODEV))
99579957
return lap_err;
99589958

99599959
if (has_palmsensor) {

0 commit comments

Comments
 (0)