From f88de1102b13a29aff658a15e9e1cc975e843047 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Fri, 7 Jul 2023 06:20:33 -0400 Subject: [PATCH] Fix chip-tool remove-keyset command. (#27676) 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);