Skip to content

Commit

Permalink
ptmx: When alloc minor, skip the start addr if it has been used
Browse files Browse the repository at this point in the history
  • Loading branch information
yangsong8-a1 authored and xiaoxiang781216 committed Dec 24, 2024
1 parent 399669f commit 3c06f0d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/serial/ptmx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

Expand Down

0 comments on commit 3c06f0d

Please sign in to comment.