From: Dmitry Torokhov Date: Mon, 4 May 2015 19:45:38 +0000 (-0700) Subject: Input: sx8654 - fix memory allocation check X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=22ffc3e42aa6a656192a45c7364fbb2de3214d93;p=linux-beck.git 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 Signed-off-by: Dmitry Torokhov --- 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";