Skip to content

Commit 3c29727

Browse files
Xichao Zhaodtor
authored andcommitted
Input: zforce_ts - omit error message when memory allocation fails
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>
1 parent d6137f2 commit 3c29727

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

drivers/input/touchscreen/zforce_ts.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -747,8 +747,7 @@ static int zforce_probe(struct i2c_client *client)
747747

748748
input_dev = devm_input_allocate_device(&client->dev);
749749
if (!input_dev)
750-
return dev_err_probe(&client->dev, -ENOMEM,
751-
"could not allocate input device\n");
750+
return -ENOMEM;
752751

753752
ts->client = client;
754753
ts->input = input_dev;

0 commit comments

Comments
 (0)