[PATCH] Input: max77693-haptic - disable bias on failed open

From: Haowen Tu

Date: Sun Nov 15 2026 - 21:26:13 EST


max77693_haptic_open() enables the MAX77843 bias before enabling the motor
regulator. If regulator_enable() fails, the function returns without
turning the bias off. The input core does not call the close callback
after a failed open, so its bias cleanup does not run either.

Disable the bias before returning the regulator error. The bias helper
already handles reporting register access errors and is a no-op for the
other supported chip variants.

Fixes: 56bbc99e6914 ("Input: max77693: Add support for Maxim 77843")
Signed-off-by: Haowen Tu <tuhaowen@xxxxxxxxxxxxx>
---
drivers/input/misc/max77693-haptic.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/input/misc/max77693-haptic.c b/drivers/input/misc/max77693-haptic.c
index 96d6d4620eb4..2bf4581b6adc 100644
--- a/drivers/input/misc/max77693-haptic.c
+++ b/drivers/input/misc/max77693-haptic.c
@@ -278,6 +278,7 @@ static int max77693_haptic_open(struct input_dev *dev)
if (error) {
dev_err(haptic->dev,
"failed to enable regulator: %d\n", error);
+ max77843_haptic_bias(haptic, false);
return error;
}

--
2.50.1