[RFC] Fix Coverity issue CID:15010

CID:15010

Fix Coverity issue (dead code).

Pointer tp cannot be NULL at this point, so conditional operator ? can
be replaced with its second expression.