1
0
Fork 0

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: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
hifive-unleashed-5.1
Dmitry Torokhov 2015-05-04 12:45:38 -07:00
parent 48853389f2
commit 22ffc3e42a
1 changed files with 1 additions and 1 deletions

View File

@ -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";