Skip to content

Commit

Permalink
Input: melfas_mip4 - fix return value check in mip4_probe()
Browse files Browse the repository at this point in the history
devm_gpiod_get_optional() may return ERR_PTR(-EPROBE_DEFER),
add a minus sign to fix it.

Fixes: 6ccb1d8 ("Input: add MELFAS MIP4 Touchscreen driver")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20220924030715.1653538-1-yangyingliang@huawei.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
  • Loading branch information
Yang Yingliang authored and Dmitry Torokhov committed Sep 25, 2022
1 parent 9c9c711 commit a54dc27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/input/touchscreen/melfas_mip4.c
Original file line number Diff line number Diff line change
Expand Up @@ -1453,7 +1453,7 @@ static int mip4_probe(struct i2c_client *client, const struct i2c_device_id *id)
"ce", GPIOD_OUT_LOW);
if (IS_ERR(ts->gpio_ce)) {
error = PTR_ERR(ts->gpio_ce);
if (error != EPROBE_DEFER)
if (error != -EPROBE_DEFER)
dev_err(&client->dev,
"Failed to get gpio: %d\n", error);
return error;
Expand Down

0 comments on commit a54dc27

Please sign in to comment.