]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
Input: qnap-mcu-input - omit error message when memory allocation fails
authorXichao Zhao <zhao.xichao@vivo.com>
Fri, 22 Aug 2025 03:47:48 +0000 (11:47 +0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sat, 18 Oct 2025 04:42:03 +0000 (21:42 -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-2-zhao.xichao@vivo.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/misc/qnap-mcu-input.c

index 76e62f0816c1fdbefdd4f96435664e59e09c0d3e..3be899bfc1145feb16f2a006ba806707cf06bbf2 100644 (file)
@@ -103,7 +103,7 @@ static int qnap_mcu_input_probe(struct platform_device *pdev)
 
        input = devm_input_allocate_device(dev);
        if (!input)
-               return dev_err_probe(dev, -ENOMEM, "no memory for input device\n");
+               return -ENOMEM;
 
        idev->input = input;
        idev->dev = dev;