Don't return `res`, which may be unset

The return value of `func` is ignored anyway, but if there is an exception then it will not be set.