ftrace: Fix the conditional that updates $ref_func
[firefly-linux-kernel-4.4.55.git] / scripts / recordmcount.pl
index 7109e2b5bc0acf61e39c24aff4b2074016e6078c..16c5563b4129d3bda2f8b5352c4630359e37cbdd 100755 (executable)
@@ -414,7 +414,7 @@ while (<IN>) {
            $read_function = 0;
        } else {
            # if we already have a function, and this is weak, skip it
-           if (!defined($ref_func) || !defined($weak{$text})) {
+           if (!defined($ref_func) && !defined($weak{$text})) {
                $ref_func = $text;
            }
        }