I'm guessing this was supposed to be `return cpu_frequency;`. cpu_frequency_struct isn't in scope anymore and you aren't returning anything.