]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
platform/x86: x86-android-tablets: Remove the use of dev_err_probe()
authorXichao Zhao <zhao.xichao@vivo.com>
Wed, 20 Aug 2025 08:51:01 +0000 (16:51 +0800)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Thu, 28 Aug 2025 11:53:32 +0000 (14:53 +0300)
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>
Reviewed-by: Hans de Goede <hansg@kernel.org>
Link: https://lore.kernel.org/r/20250820085101.395377-1-zhao.xichao@vivo.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/x86-android-tablets/core.c

index 2a9c471785050c1c6e43940cbe4ced336aa2f934..db76ba3abd7b2cb73f89e28dfef9b194d566607f 100644 (file)
@@ -265,8 +265,7 @@ static __init int x86_instantiate_spi_dev(const struct x86_dev_info *dev_info, i
        spi_devs[idx] = spi_new_device(controller, &board_info);
        put_device(&controller->dev);
        if (!spi_devs[idx])
-               return dev_err_probe(&controller->dev, -ENOMEM,
-                                    "creating SPI-device %d\n", idx);
+               return -ENOMEM;
 
        return 0;
 }