diff --git a/src/app/EventManagement.h b/src/app/EventManagement.h index f8637a1609d23a..217b05f0bf77d5 100644 --- a/src/app/EventManagement.h +++ b/src/app/EventManagement.h @@ -219,7 +219,7 @@ struct LogStorageResources { if (mpCounterStorage != nullptr && mCounterKey != nullptr && mCounterEpoch != 0) { - return (mpCounterStorage->Init(*mCounterKey, mCounterEpoch) != CHIP_NO_ERROR) ? mpCounterStorage : nullptr; + return (mpCounterStorage->Init(*mCounterKey, mCounterEpoch) == CHIP_NO_ERROR) ? mpCounterStorage : nullptr; } return nullptr; }