diff mbox series

[v1,01/25] checkpatch: Fix use of uninitialized value

Message ID 20210419145435.14083-2-alex.bennee@linaro.org (mailing list archive)
State New, archived
Headers show
Series testing/next (hexagon/tricore/test cc) | expand

Commit Message

Alex Bennée April 19, 2021, 2:54 p.m. UTC
From: Greg Kurz <groug@kaod.org>

checkfilename() doesn't always set $acpi_testexpected. Fix the following

Use of uninitialized value $acpi_testexpected in string eq at
 ./scripts/checkpatch.pl line 1529.

Fixes: d2f1af0e4120 ("checkpatch: don't emit warning on newly created acpi data files")
Signed-off-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Isaku Yamahata <isaku.yamahata@intel.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Cc: isaku.yamahata@intel.com
Message-Id: <20210408164610.14229-1-alex.bennee@linaro.org>
Message-Id: <161786467973.295167.5612704777283969903.stgit@bahia.lan>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
 scripts/checkpatch.pl | 1 +
 1 file changed, 1 insertion(+)
diff mbox series


diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 8f7053ec9b..3d185cceac 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1532,6 +1532,7 @@  sub process {
 		     ($line =~ /\{\s*([\w\/\.\-]*)\s*\=\>\s*([\w\/\.\-]*)\s*\}/ &&
 		      (defined($1) || defined($2)))) &&
                       !(($realfile ne '') &&
+                        defined($acpi_testexpected) &&
                         ($realfile eq $acpi_testexpected))) {
 			$reported_maintainer_file = 1;
 			WARN("added, moved or deleted file(s), does MAINTAINERS need updating?\n" . $herecurr);