1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-01 16:52:14 +02:00

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 <ovpanait@gmail.com>
This commit is contained in:
Ovidiu Panait
2022-05-15 21:40:28 +03:00
committed by Tom Rini
parent b4d3b338df
commit 12c90955a7

View File

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