Remove an unnecessary check as identified by coverity.

I introduced it in a3a31070daae1b341c7101aa6f2a84213d0f92a7.