[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250819111524.584405-1-zhao.xichao@vivo.com>
Date: Tue, 19 Aug 2025 19:15:24 +0800
From: Xichao Zhao <zhao.xichao@...o.com>
To: gregkh@...uxfoundation.org,
jirislaby@...nel.org
Cc: linux-kernel@...r.kernel.org,
linux-serial@...r.kernel.org,
Xichao Zhao <zhao.xichao@...o.com>
Subject: [PATCH v2] tty: serial: Replace -ENOMEM with -ENOSPC
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@...o.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
Powered by blists - more mailing lists