Update osc.c

Error code wrongly checked.