diff mbox series

[1/6] patman: Fix 'warning' typo

Message ID 20200506222910.152322-2-sjg@chromium.org
State Accepted
Commit 870bd567994b4455c9f68c3bc30fea6499fe5f54
Headers show
Series patman: Fixes to allow patman to work with Zephyr OS | expand

Commit Message

Simon Glass May 6, 2020, 10:29 p.m. UTC
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 at chromium.org>
---

 tools/patman/checkpatch.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/tools/patman/checkpatch.py b/tools/patman/checkpatch.py
index 795b519314..a2611a8a82 100644
--- a/tools/patman/checkpatch.py
+++ b/tools/patman/checkpatch.py
@@ -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()