drivers/tty/serial/max3100.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
The dev_err_probe() doesn't do anything when error is '-ENOMEM'.
And using -ENOSPC here is more appropriate. So replace -ENOMEM
with -ENOSPC.
Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com>
---
drivers/tty/serial/max3100.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/serial/max3100.c b/drivers/tty/serial/max3100.c
index 67d80f8f801e..3faa1b6aa3ee 100644
--- a/drivers/tty/serial/max3100.c
+++ b/drivers/tty/serial/max3100.c
@@ -705,7 +705,7 @@ static int max3100_probe(struct spi_device *spi)
break;
if (i == MAX_MAX3100) {
mutex_unlock(&max3100s_lock);
- return dev_err_probe(dev, -ENOMEM, "too many MAX3100 chips\n");
+ return dev_err_probe(dev, -ENOSPC, "too many MAX3100 chips\n");
}
max3100s[i] = kzalloc(sizeof(struct max3100_port), GFP_KERNEL);
--
2.34.1
On Tue, Aug 19, 2025 at 07:15:24PM +0800, Xichao Zhao wrote: > The dev_err_probe() doesn't do anything when error is '-ENOMEM'. > And using -ENOSPC here is more appropriate. So replace -ENOMEM > with -ENOSPC. > > Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com> > --- > drivers/tty/serial/max3100.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/tty/serial/max3100.c b/drivers/tty/serial/max3100.c > index 67d80f8f801e..3faa1b6aa3ee 100644 > --- a/drivers/tty/serial/max3100.c > +++ b/drivers/tty/serial/max3100.c > @@ -705,7 +705,7 @@ static int max3100_probe(struct spi_device *spi) > break; > if (i == MAX_MAX3100) { > mutex_unlock(&max3100s_lock); > - return dev_err_probe(dev, -ENOMEM, "too many MAX3100 chips\n"); > + return dev_err_probe(dev, -ENOSPC, "too many MAX3100 chips\n"); > } > > max3100s[i] = kzalloc(sizeof(struct max3100_port), GFP_KERNEL); > -- > 2.34.1 > > Hi, This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him a patch that has triggered this response. He used to manually respond to these common problems, but in order to save his sanity (he kept writing the same thing over and over, yet to different people), I was created. Hopefully you will not take offence and will fix the problem in your patch and resubmit it so that it can be accepted into the Linux kernel tree. You are receiving this message because of the following common error(s) as indicated below: - This looks like a new version of a previously submitted patch, but you did not list below the --- line any changes from the previous version. Please read the section entitled "The canonical patch format" in the kernel file, Documentation/process/submitting-patches.rst for what needs to be done here to properly describe this. If you wish to discuss this problem further, or you have questions about how to resolve this issue, please feel free to respond to this email and Greg will reply once he has dug out from the pending patches received from other developers. thanks, greg k-h's patch email bot
© 2016 - 2025 Red Hat, Inc.