This is valid and can be quite useful for example to create cleaner code in situations when you want to do some error handling before returning:
void ErrRet(int code, char* msg)
{
// code logging/handling error
}
void f()
{
if (...) return ErrRet(5, "Error Message !");
// code continue
}