diff options
Diffstat (limited to 'arch/mips/kernel/process.c')
| -rw-r--r-- | arch/mips/kernel/process.c | 7 | 
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c index 6829a064aac8..339870ed92f7 100644 --- a/arch/mips/kernel/process.c +++ b/arch/mips/kernel/process.c @@ -371,7 +371,7 @@ static inline int is_sp_move_ins(union mips_instruction *ip, int *frame_size)  static int get_frame_info(struct mips_frame_info *info)  {  	bool is_mmips = IS_ENABLED(CONFIG_CPU_MICROMIPS); -	union mips_instruction insn, *ip, *ip_end; +	union mips_instruction insn, *ip;  	const unsigned int max_insns = 128;  	unsigned int last_insn_size = 0;  	unsigned int i; @@ -384,10 +384,9 @@ static int get_frame_info(struct mips_frame_info *info)  	if (!ip)  		goto err; -	ip_end = (void *)ip + info->func_size; - -	for (i = 0; i < max_insns && ip < ip_end; i++) { +	for (i = 0; i < max_insns; i++) {  		ip = (void *)ip + last_insn_size; +  		if (is_mmips && mm_insn_16bit(ip->halfword[0])) {  			insn.word = ip->halfword[0] << 16;  			last_insn_size = 2;  |