Commit 22ffc3e4 authored by Dmitry Torokhov's avatar Dmitry Torokhov

Input: sx8654 - fix memory allocation check

We have been testing wrong variable when trying to make sure that input
allocation succeeded.

Reported by Coverity (CID 1295918).
Acked-by: default avatarSébastien Szymanski <sebastien.szymanski@armadeus.com>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 48853389
......@@ -187,7 +187,7 @@ static int sx8654_probe(struct i2c_client *client,
return -ENOMEM;
input = devm_input_allocate_device(&client->dev);
if (!sx8654)
if (!input)
return -ENOMEM;
input->name = "SX8654 I2C Touchscreen";
......
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