Commit a54dc27b authored by Yang Yingliang's avatar Yang Yingliang Committed by Dmitry Torokhov

Input: melfas_mip4 - fix return value check in mip4_probe()

devm_gpiod_get_optional() may return ERR_PTR(-EPROBE_DEFER),
add a minus sign to fix it.

Fixes: 6ccb1d8f ("Input: add MELFAS MIP4 Touchscreen driver")
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20220924030715.1653538-1-yangyingliang@huawei.comSigned-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 9c9c7116
...@@ -1453,7 +1453,7 @@ static int mip4_probe(struct i2c_client *client, const struct i2c_device_id *id) ...@@ -1453,7 +1453,7 @@ static int mip4_probe(struct i2c_client *client, const struct i2c_device_id *id)
"ce", GPIOD_OUT_LOW); "ce", GPIOD_OUT_LOW);
if (IS_ERR(ts->gpio_ce)) { if (IS_ERR(ts->gpio_ce)) {
error = PTR_ERR(ts->gpio_ce); error = PTR_ERR(ts->gpio_ce);
if (error != EPROBE_DEFER) if (error != -EPROBE_DEFER)
dev_err(&client->dev, dev_err(&client->dev,
"Failed to get gpio: %d\n", error); "Failed to get gpio: %d\n", error);
return error; return error;
......
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