From 5b019a7d8e7a41f9cddab9480d4a69c573e3f8ff Mon Sep 17 00:00:00 2001 From: yangsong8 Date: Fri, 18 Oct 2024 21:47:51 +0800 Subject: [PATCH] ptmx: When alloc minor, skip the start addr if it has been used --- drivers/serial/ptmx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/serial/ptmx.c b/drivers/serial/ptmx.c index 467afe09d09..584b88cecd5 100644 --- a/drivers/serial/ptmx.c +++ b/drivers/serial/ptmx.c @@ -149,7 +149,7 @@ static int ptmx_minor_allocate(void) * prevent (unexpected) infinite loops. */ - if (startaddr == minor) + if (startaddr == g_ptmx.px_next) { /* We are back where we started... the are no free device address */