drivers/note: Fix the mismatch of va_end call

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2022-12-30 11:46:06 +08:00 committed by Petro Karashchenko
parent 87a1f69a3c
commit cc9166274a

View File

@ -1195,6 +1195,7 @@ void sched_note_syscall_enter(int nr, int argc, ...)
for (driver = g_note_drivers; *driver; driver++)
{
va_list copy;
va_copy(copy, ap);
if (note_syscall_enter(*driver, nr, argc, &copy))
{
@ -1202,9 +1203,9 @@ void sched_note_syscall_enter(int nr, int argc, ...)
continue;
}
va_end(copy);
if ((*driver)->ops->add == NULL)
{
va_end(copy);
continue;
}
@ -1231,6 +1232,8 @@ void sched_note_syscall_enter(int nr, int argc, ...)
}
}
va_end(copy);
/* Add the note to circular buffer */
note_add(*driver, &note, length);