From 12c90955a7e82687acaed3cb53d096bc669e82ca Mon Sep 17 00:00:00 2001 From: Ovidiu Panait Date: Sun, 15 May 2022 21:40:28 +0300 Subject: [PATCH] event: remove CONFIG_EVENT_DYNAMIC check in event_register() The whole event_register() function is wrapped in EVENT_DYNAMIC #ifdef checks, so the inner check is not needed: #if CONFIG_IS_ENABLED(EVENT_DYNAMIC) ... int event_register(...) { ... if (!CONFIG_IS_ENABLED(EVENT_DYNAMIC)) return -ENOSYS; } #endif Signed-off-by: Ovidiu Panait --- common/event.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/common/event.c b/common/event.c index 9d67a060a0..063647447d 100644 --- a/common/event.c +++ b/common/event.c @@ -159,8 +159,6 @@ int event_register(const char *id, enum event_t type, event_handler_t func, void struct event_state *state = gd_event_state(); struct event_spy *spy; - if (!CONFIG_IS_ENABLED(EVENT_DYNAMIC)) - return -ENOSYS; spy = malloc(sizeof(*spy)); if (!spy) return log_msg_ret("alloc", -ENOMEM); -- 2.39.5