Court reverses order sacking IGP, says he wasn’t given fair hearing