s390/zcrypt: fix ap_instructions_available() returncodes
authorHarald Freudenberger <freude@linux.ibm.com>
Thu, 9 Aug 2018 09:59:34 +0000 (11:59 +0200)
committerHeiko Carstens <heiko.carstens@de.ibm.com>
Thu, 16 Aug 2018 12:49:11 +0000 (14:49 +0200)
commit2395103b3fbf2553d94a64ac3e29595cb040474b
treef0cf13720af09121525d3bea8c63843cc587702c
parentbc00b3ec7722b33cb67fd2cb6bf334e03a6322c2
s390/zcrypt: fix ap_instructions_available() returncodes

During review of KVM patches it was complained that the
ap_instructions_available() function returns 0 if AP
instructions are available and -ENODEV if not. The function
acts like a boolean function to check for AP instructions
available and thus should return 0 on failure and != 0 on
success. Changed to the suggested behaviour and adapted
the one and only caller of this function which is the ap
bus core code.

Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Acked-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
arch/s390/include/asm/ap.h
drivers/s390/crypto/ap_bus.c