diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2022-09-24 11:07:15 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-10-05 10:37:44 +0200 |
commit | 6ca922ec7598344ca47ba21868284ebf4fb894c7 (patch) | |
tree | 26a50e45af2ef131dda9094b029fa2991c99cde1 | |
parent | 38c4d8230f937f3cf8a9f0e7bb95d982ba36a575 (diff) | |
download | linux-stable-6ca922ec7598344ca47ba21868284ebf4fb894c7.tar.gz linux-stable-6ca922ec7598344ca47ba21868284ebf4fb894c7.tar.bz2 linux-stable-6ca922ec7598344ca47ba21868284ebf4fb894c7.zip |
Input: melfas_mip4 - fix return value check in mip4_probe()
[ Upstream commit a54dc27bd25f20ee3ea2009584b3166d25178243 ]
devm_gpiod_get_optional() may return ERR_PTR(-EPROBE_DEFER),
add a minus sign to fix it.
Fixes: 6ccb1d8f78bd ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | drivers/input/touchscreen/melfas_mip4.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/touchscreen/melfas_mip4.c b/drivers/input/touchscreen/melfas_mip4.c index 247c3aaba2d8..0588b8f04dac 100644 --- a/drivers/input/touchscreen/melfas_mip4.c +++ b/drivers/input/touchscreen/melfas_mip4.c @@ -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; |