mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
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 <[email protected]> Acked-by: Cornelia Huck <[email protected]> Signed-off-by: Heiko Carstens <[email protected]>
This commit is contained in:
parent
bc00b3ec77
commit
2395103b3f
2 changed files with 6 additions and 6 deletions
|
|
@ -1201,7 +1201,7 @@ static int __init ap_module_init(void)
|
|||
if (rc)
|
||||
return rc;
|
||||
|
||||
if (ap_instructions_available() != 0) {
|
||||
if (!ap_instructions_available()) {
|
||||
pr_warn("The hardware system does not support AP instructions\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue