Merge branch '3.14-fixes' into mips-for-linux-next
[linux-2.6-block.git] / arch / mips / kernel / ftrace.c
index ddcc3500248d5e3721251a7c89a751412b3ccdfb..74fe73506d8f9ce8a1eb5f3536df282829f02c7e 100644 (file)
@@ -115,11 +115,10 @@ static int ftrace_modify_code_2(unsigned long ip, unsigned int new_code1,
        safe_store_code(new_code1, ip, faulted);
        if (unlikely(faulted))
                return -EFAULT;
-       ip += 4;
-       safe_store_code(new_code2, ip, faulted);
+       safe_store_code(new_code2, ip + 4, faulted);
        if (unlikely(faulted))
                return -EFAULT;
-       flush_icache_range(ip, ip + 8); /* original ip + 12 */
+       flush_icache_range(ip, ip + 8);
        return 0;
 }
 #endif