mirror of
				https://xff.cz/git/u-boot/
				synced 2025-10-31 02:15:45 +01: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:
		| @@ -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_state *state = gd_event_state(); | ||||||
| 	struct event_spy *spy; | 	struct event_spy *spy; | ||||||
|  |  | ||||||
| 	if (!CONFIG_IS_ENABLED(EVENT_DYNAMIC)) |  | ||||||
| 		return -ENOSYS; |  | ||||||
| 	spy = malloc(sizeof(*spy)); | 	spy = malloc(sizeof(*spy)); | ||||||
| 	if (!spy) | 	if (!spy) | ||||||
| 		return log_msg_ret("alloc", -ENOMEM); | 		return log_msg_ret("alloc", -ENOMEM); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user