diff mbox series

[RFC] scripts/checkpatch: fix uninitialised value check

Message ID 20210408164610.14229-1-alex.bennee@linaro.org (mailing list archive)
State New, archived
Headers show
Series [RFC] scripts/checkpatch: fix uninitialised value check | expand

Commit Message

Alex Bennée April 8, 2021, 4:46 p.m. UTC
This was starting to show up in the check-patch test on gitlab.

Fixes: d2f1af0e41 ("checkpatch: don't emit warning on newly created acpi data files")
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Cc: Isaku Yamahata <isaku.yamahata@intel.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
---
 scripts/checkpatch.pl | 1 +
 1 file changed, 1 insertion(+)

Comments

Peter Maydell April 8, 2021, 4:50 p.m. UTC | #1
On Thu, 8 Apr 2021 at 17:49, Alex Bennée <alex.bennee@linaro.org> wrote:
>
> This was starting to show up in the check-patch test on gitlab.
>
> Fixes: d2f1af0e41 ("checkpatch: don't emit warning on newly created acpi data files")
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> Cc: Isaku Yamahata <isaku.yamahata@intel.com>
> Cc: Michael S. Tsirkin <mst@redhat.com>
> ---
>  scripts/checkpatch.pl | 1 +
>  1 file changed, 1 insertion(+)


Already submitted by Greg:
https://patchew.org/QEMU/161786467973.295167.5612704777283969903.stgit@bahia.lan/

thanks
-- PMM
diff mbox series

Patch

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);