Skip to content

Commit

Permalink
Input: sx8654 - fix memory allocation check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dmitry Torokhov committed May 13, 2015
1 parent 4885338 commit 22ffc3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/input/touchscreen/sx8654.c
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit 22ffc3e

Please sign in to comment.