From a577788ba3b295e81670653ccfe08ff61a1951b3 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Thu, 6 Jul 2023 16:51:55 -0400 Subject: [PATCH] Fix chip-tool remove-keyset command. We were returning without calling SetCommandExitStatus if removing group keys _succeeded_, which is backwards. Fixes https://github.com/project-chip/connectedhomeip/issues/27600 --- examples/chip-tool/commands/group/Commands.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/examples/chip-tool/commands/group/Commands.h b/examples/chip-tool/commands/group/Commands.h index e60ba6853fda85..b66d62dccf5171 100644 --- a/examples/chip-tool/commands/group/Commands.h +++ b/examples/chip-tool/commands/group/Commands.h @@ -332,10 +332,7 @@ class RemoveKeySet : public CHIPCommand } iter->Release(); - if (err == CHIP_NO_ERROR) - { - return err; - } + ReturnErrorOnFailure(err); ReturnErrorOnFailure(groupDataProvider->RemoveKeySet(fabricIndex, keysetId)); SetCommandExitStatus(CHIP_NO_ERROR);