Fixed undefined behavior in ginv.

ginv lacks a return statement. Clang takes advantage of the license
to do undefined behavior and simply continues into random code.
(Which eventually leads to a SIGSEGV.)