In ftrace, logic is defined in the WARN_ON_ONCE, which can become a
nop with some configs. This patch fixes it.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
                   unsigned char *new_code)
 {
        unsigned char replaced[MCOUNT_INSN_SIZE];
+       int ret;
 
        /*
         * Note: Due to modules and __init, code can
        if (memcmp(replaced, old_code, MCOUNT_INSN_SIZE) != 0)
                return 2;
 
-       WARN_ON_ONCE(__copy_to_user_inatomic((char __user *)ip, new_code,
-                                   MCOUNT_INSN_SIZE));
+       ret = __copy_to_user_inatomic((char __user *)ip, new_code,
+                                       MCOUNT_INSN_SIZE);
+       WARN_ON_ONCE(ret);
 
        sync_core();