Fix "warning: missing return statement at end of non-void function" (#21424)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/21424
Fixes #21418
Differential Revision: D15676140
fbshipit-source-id: cfadce164c6cfefb16f8bf7bc09529ba8b910769