Commit c4a83492 authored by Dmitry Torokhov's avatar Dmitry Torokhov

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.

Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD
Link: https://lore.kernel.org/r/20240824055047.1706392-12-dmitry.torokhov@gmail.comSigned-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 43a48ec5
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment