]> git.baikalelectronics.ru Git - kernel.git/commitdiff
Input: melfas_mip4 - fix return value check in mip4_probe()
authorYang Yingliang <yangyingliang@huawei.com>
Sat, 24 Sep 2022 03:07:15 +0000 (11:07 +0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sun, 25 Sep 2022 05:09:49 +0000 (22:09 -0700)
devm_gpiod_get_optional() may return ERR_PTR(-EPROBE_DEFER),
add a minus sign to fix it.

Fixes: d8391bdcdc4f ("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>
drivers/input/touchscreen/melfas_mip4.c

index 2745bf1aee3815f15e5e5c575bd74415ab30b1b6..83f4be05e27b66f3fecb28a7acbb8a44c8241085 100644 (file)
@@ -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;