From 11047448c652283f18b0459090fb8593bfa714b4 Mon Sep 17 00:00:00 2001 From: yunhanw-google Date: Fri, 10 Dec 2021 17:55:50 -0800 Subject: [PATCH] Fix IM Event Persistent counter init (#12922) --- src/app/EventManagement.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }