[PATCH v3 1/2] HID: spi-hid: propagate reset assertion errors during initialization
From: Jizhou Tong
Date: Thu Nov 05 2026 - 14:19:16 EST
Stop initialization before power-up or IRQ enablement if asserting reset
fails. Return the platform error through the core probe and frontend.
This initialization path still ignores the assertion error in v7.
Signed-off-by: Jizhou Tong <fqwqf@xxxxxxxxx>
---
drivers/hid/spi-hid/spi-hid-core.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/hid/spi-hid/spi-hid-core.c b/drivers/hid/spi-hid/spi-hid-core.c
index 496b33cdf3..fd64d2d2cb 100644
--- a/drivers/hid/spi-hid/spi-hid-core.c
+++ b/drivers/hid/spi-hid/spi-hid-core.c
@@ -1468,7 +1468,11 @@ static int spi_hid_dev_init(struct spi_hid *shid)
guard(mutex)(&shid->power_lock);
- shid->ops->assert_reset(shid->ops);
+ error = shid->ops->assert_reset(shid->ops);
+ if (error) {
+ dev_err(dev, "failed to assert reset: %d\n", error);
+ return error;
+ }
shid->ops->sleep_minimal_reset_delay(shid->ops);