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);