Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+1 -1
+1 -1
drivers/input/touchscreen/sx8654.c
··· 187 187 return -ENOMEM; 188 188 189 189 input = devm_input_allocate_device(&client->dev); 190 - if (!sx8654) 190 + if (!input) 191 191 return -ENOMEM; 192 192 193 193 input->name = "SX8654 I2C Touchscreen";