From: Ovidiu Panait Date: Sun, 15 May 2022 18:40:28 +0000 (+0300) Subject: event: remove CONFIG_EVENT_DYNAMIC check in event_register() X-Git-Tag: v2025.01-rc5-pxa1908~1353^2~25^2~14 X-Git-Url: http://git.dujemihanovic.xyz/img/%7B%7B%20%28.OutputFormats.Get?a=commitdiff_plain;h=12c90955a7e82687acaed3cb53d096bc669e82ca;p=u-boot.git 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 --- 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);