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 795b5193145e2d58b5682f25adc775f03d0dab83..a2611a8a82e208df7d66e54bd660fe2fb4fd0ab2 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()