[PATCH linux-next] x86/unwind: Remove the initialization of mid

From: cgel . zte
Date: Thu Nov 11 2021 - 10:13:58 EST


From: luo penghao <luo.penghao@xxxxxxxxxx>

In the execution of the function, only the while loop will use this
variable. And the value of mid will be overwritten at the beginning

Reported-by: Zeal Robot <zealci@xxxxxxxxxx>
Signed-off-by: luo penghao <luo.penghao@xxxxxxxxxx>
---
arch/x86/kernel/unwind_orc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/unwind_orc.c b/arch/x86/kernel/unwind_orc.c
index a120253..02556e0 100644
--- a/arch/x86/kernel/unwind_orc.c
+++ b/arch/x86/kernel/unwind_orc.c
@@ -35,7 +35,7 @@ static struct orc_entry *__orc_find(int *ip_table, struct orc_entry *u_table,
{
int *first = ip_table;
int *last = ip_table + num_entries - 1;
- int *mid = first, *found = first;
+ int *mid, *found = first;

if (!num_entries)
return NULL;
--
2.15.2