]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
tty: serial: Modify the use of dev_err_probe()
authorXichao Zhao <zhao.xichao@vivo.com>
Tue, 19 Aug 2025 12:09:27 +0000 (20:09 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 21 Aug 2025 06:09:20 +0000 (08:09 +0200)
commit706c3c02eecd41dc675e9102b3719661cd3e30e2
treed7b98836555870e0e1aa489c119110adeed4c3f2
parent7cd9f5d6c5a3f31d2b282d31ddc4d78ff83a5c08
tty: serial: Modify the use of dev_err_probe()

The dev_err_probe() doesn't do anything when error is '-ENOMEM'.
Make the following two changes:
(1) Replace -ENOMEM with -ENOSPC in max3100_probe().
(2) Just return -ENOMEM instead in max310x_probe().

Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com>
Reviewed-by: Jiri Slaby <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20250819120927.607744-1-zhao.xichao@vivo.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/max3100.c
drivers/tty/serial/max310x.c