summaryrefslogtreecommitdiffstats
path: root/drivers/input/touchscreen/sx8654.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2015-05-04 21:45:38 +0200
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2015-05-13 19:29:33 +0200
commit22ffc3e42aa6a656192a45c7364fbb2de3214d93 (patch)
treeba13e6c566a7f168599a8c25a07bb7748a6f6017 /drivers/input/touchscreen/sx8654.c
parentMerge branch 'next' into for-linus (diff)
downloadlinux-22ffc3e42aa6a656192a45c7364fbb2de3214d93.tar.xz
linux-22ffc3e42aa6a656192a45c7364fbb2de3214d93.zip
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>
Diffstat (limited to 'drivers/input/touchscreen/sx8654.c')
-rw-r--r--drivers/input/touchscreen/sx8654.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/touchscreen/sx8654.c b/drivers/input/touchscreen/sx8654.c
index aecb9ad2e701..642f4a53de50 100644
--- a/drivers/input/touchscreen/sx8654.c
+++ b/drivers/input/touchscreen/sx8654.c
@@ -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";