From: Dmitry Torokhov Date: Sat, 24 Aug 2024 05:50:35 +0000 (-0700) Subject: Input: zforce_ts - do not ignore errors when acquiring regulator X-Git-Tag: v6.12-rc1~65^2~2^2~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c4a8349262aaea42163dbc9171208f712f172d25;p=thirdparty%2Fkernel%2Flinux.git 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 # Tolino Shine2HD Link: https://lore.kernel.org/r/20240824055047.1706392-12-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/touchscreen/zforce_ts.c b/drivers/input/touchscreen/zforce_ts.c index c5b4c85359b45..0d06dda311d4c 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);