[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240824055047.1706392-12-dmitry.torokhov@gmail.com>
Date: Fri, 23 Aug 2024 22:50:35 -0700
From: Dmitry Torokhov <dmitry.torokhov@...il.com>
To: Heiko Stübner <heiko@...ech.de>,
linux-input@...r.kernel.org
Cc: Andreas Kemnade <andreas@...nade.info>,
linux-kernel@...r.kernel.org
Subject: [PATCH 11/18] Input: zforce_ts - do not ignore errors when acquiring regulator
We should abort probe on any error besides -ENOENT which signifies that
the regulator is not defined in device tree or elsewhere, not only
when we see -EPROBE_DEFER.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@...il.com>
---
drivers/input/touchscreen/zforce_ts.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/touchscreen/zforce_ts.c b/drivers/input/touchscreen/zforce_ts.c
index c5b4c85359b4..0d06dda311d4 100644
--- a/drivers/input/touchscreen/zforce_ts.c
+++ b/drivers/input/touchscreen/zforce_ts.c
@@ -753,7 +753,7 @@ static int zforce_probe(struct i2c_client *client)
ts->reg_vdd = devm_regulator_get_optional(&client->dev, "vdd");
if (IS_ERR(ts->reg_vdd)) {
ret = PTR_ERR(ts->reg_vdd);
- if (ret == -EPROBE_DEFER)
+ if (ret != -ENOENT)
return ret;
} else {
ret = regulator_enable(ts->reg_vdd);
--
2.46.0.295.g3b9ea8a38a-goog
Powered by blists - more mailing lists