From: Xichao Zhao Date: Fri, 22 Aug 2025 03:47:49 +0000 (+0800) Subject: Input: zforce_ts - omit error message when memory allocation fails X-Git-Tag: v6.19-rc1~38^2^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c297278a61feaf17d59fb288907fbd8f52dc879;p=thirdparty%2Fkernel%2Flinux.git 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 Link: https://patch.msgid.link/20250822034751.244248-3-zhao.xichao@vivo.com Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/touchscreen/zforce_ts.c b/drivers/input/touchscreen/zforce_ts.c index df42fdf36ae3b..a360749fa076f 100644 --- a/drivers/input/touchscreen/zforce_ts.c +++ b/drivers/input/touchscreen/zforce_ts.c @@ -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;