tpm2_createpolicy: check earlier if PCR bank ids were selected
tpm2_createpolicy: check earlier if PCR bank ids were selected

When building a PCR policy, a check is made if the list of PCR bank ids
were set using the -L option. The check can happen much earlier so move
it outside the build_pcr_policy() function. That way this function does
not depend on this flag that's specific to the tpm2_createpolicy tool.

Signed-off-by: Javier Martinez Canillas <8fdf2abf85d34ea8f3f979ef25dc1f25d94aca29@redhat.com>

martinezjavier/tpm2-tools,01org/tpm2.0-tools,martinezjavier/tpm2-tools,martinezjavier/tpm2-tools,01org/tpm2.0-tools,martinezjavier/tpm2-tools,01org/tpm2.0-tools