Input: make input_register_handler() return error codes