Redundant if loop

The same code is executed whether the following condition is true or false.

if (!TEST_ptr(pkey))
    goto err;
err:
    return pkey;