]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
Input: zforce_ts - omit error message when memory allocation fails
authorXichao Zhao <zhao.xichao@vivo.com>
Fri, 22 Aug 2025 03:47:49 +0000 (11:47 +0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sat, 18 Oct 2025 04:43:06 +0000 (21:43 -0700)
The dev_err_probe() doesn't do anything when error is '-ENOMEM'.
Therefore, remove the useless call to dev_err_probe(), and just
return the value instead.

Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com>
Link: https://patch.msgid.link/20250822034751.244248-3-zhao.xichao@vivo.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/touchscreen/zforce_ts.c

index df42fdf36ae3b0402dd9fd22a245036e5bd11380..a360749fa076fdf0e4a69980639776a6e506ad34 100644 (file)
@@ -747,8 +747,7 @@ static int zforce_probe(struct i2c_client *client)
 
        input_dev = devm_input_allocate_device(&client->dev);
        if (!input_dev)
-               return dev_err_probe(&client->dev, -ENOMEM,
-                                    "could not allocate input device\n");
+               return -ENOMEM;
 
        ts->client = client;
        ts->input = input_dev;