patman: Fix 'warning' typo
authorSimon Glass <sjg@chromium.org>
Wed, 6 May 2020 22:29:04 +0000 (16:29 -0600)
committerSimon Glass <sjg@chromium.org>
Fri, 12 Jun 2020 02:52:10 +0000 (20:52 -0600)
If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

   TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>
tools/patman/checkpatch.py

index 795b519..a2611a8 100644 (file)
@@ -59,7 +59,7 @@ def CheckPatch(fname, verbose=False):
               'stdout']
     result = collections.namedtuple('CheckPatchResult', fields)
     result.ok = False
-    result.errors, result.warning, result.checks = 0, 0, 0
+    result.errors, result.warnings, result.checks = 0, 0, 0
     result.lines = 0
     result.problems = []
     chk = FindCheckPatch()