提交 22ffc3e4 编写于 作者: D 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: NSébastien Szymanski <sebastien.szymanski@armadeus.com>
Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册