Remove an unnecessary check as identified by coverity.